summaryrefslogtreecommitdiff
path: root/test-cli/test/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/tests')
-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()