From b58a64c6993ab60f18a1a0ca8c90f167c7e6656b Mon Sep 17 00:00:00 2001 From: Hector Fernandez Date: Thu, 2 Jul 2020 14:45:48 +0200 Subject: Added support for IGEP0020 and IGEP0030. Fixed problem in Audio test. --- test-cli/test/tests/qaudio.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test-cli/test/tests/qaudio.py') 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() -- cgit v1.1