summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qaudio.py
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-07-02 14:45:48 +0200
committerHector Fernandez <hector@iatec.biz>2020-07-02 14:45:48 +0200
commitb58a64c6993ab60f18a1a0ca8c90f167c7e6656b (patch)
treecab1d7f55db417bc18ed659492e851923b15f82b /test-cli/test/tests/qaudio.py
parent34df86b37d6838b115e65e5f3a332344afeb86b8 (diff)
downloadboard-b58a64c6993ab60f18a1a0ca8c90f167c7e6656b.zip
board-b58a64c6993ab60f18a1a0ca8c90f167c7e6656b.tar.gz
board-b58a64c6993ab60f18a1a0ca8c90f167c7e6656b.tar.bz2
Added support for IGEP0020 and IGEP0030. Fixed problem in Audio test.
Diffstat (limited to 'test-cli/test/tests/qaudio.py')
-rw-r--r--test-cli/test/tests/qaudio.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test-cli/test/tests/qaudio.py b/test-cli/test/tests/qaudio.py
index 5baffe4..ef0cf53 100644
--- a/test-cli/test/tests/qaudio.py
+++ b/test-cli/test/tests/qaudio.py
@@ -2,6 +2,7 @@ import unittest
import sh
import wave
import contextlib
+import os
def calc_audio_duration(fname):
@@ -25,10 +26,11 @@ class Qaudio(unittest.TestCase):
self.__resultlist = []
def execute(self):
+ test_abspath = os.path.dirname(os.path.abspath(__file__)) + "/../"
# analize audio file
- recordtime = calc_audio_duration("test/files/dtmf-13579.wav") + 0.15
+ recordtime = calc_audio_duration(os.path.join(test_abspath, "files/dtmf-13579.wav")) + 0.15
# play and record
- p1 = sh.aplay("test/files/dtmf-13579.wav", _bg=True)
+ p1 = sh.aplay(os.path.join(test_abspath, "files/dtmf-13579.wav"), _bg=True)
p2 = sh.arecord("-r", 8000, "-d", recordtime, "/tmp/station/recorded.wav", _bg=True)
p1.wait()
p2.wait()