diff options
author | Hector Fernandez <hector@iatec.biz> | 2020-07-03 13:55:45 +0200 |
---|---|---|
committer | Hector Fernandez <hector@iatec.biz> | 2020-07-03 13:55:45 +0200 |
commit | 5dcd213c28451ac210703dc5bf9bf538671a0682 (patch) | |
tree | 2ccb2c625c6411d5fa7956c502e4ce365b4e0c7b /test-cli/test/tests/qaudio.py | |
parent | b58a64c6993ab60f18a1a0ca8c90f167c7e6656b (diff) | |
download | board-5dcd213c28451ac210703dc5bf9bf538671a0682.zip board-5dcd213c28451ac210703dc5bf9bf538671a0682.tar.gz board-5dcd213c28451ac210703dc5bf9bf538671a0682.tar.bz2 |
Created new USB LOOP test. Moved all the test files to /var/lib/hwtest-files/ folder.
Diffstat (limited to 'test-cli/test/tests/qaudio.py')
-rw-r--r-- | test-cli/test/tests/qaudio.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test-cli/test/tests/qaudio.py b/test-cli/test/tests/qaudio.py index ef0cf53..acad4a9 100644 --- a/test-cli/test/tests/qaudio.py +++ b/test-cli/test/tests/qaudio.py @@ -2,7 +2,6 @@ import unittest import sh import wave import contextlib -import os def calc_audio_duration(fname): @@ -26,11 +25,10 @@ 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(os.path.join(test_abspath, "files/dtmf-13579.wav")) + 0.15 + recordtime = calc_audio_duration("/var/lib/hwtest-files/dtmf-13579.wav") + 0.15 # play and record - p1 = sh.aplay(os.path.join(test_abspath, "files/dtmf-13579.wav"), _bg=True) + p1 = sh.aplay("/var/lib/hwtest-files/dtmf-13579.wav", _bg=True) p2 = sh.arecord("-r", 8000, "-d", recordtime, "/tmp/station/recorded.wav", _bg=True) p1.wait() p2.wait() |