diff options
author | Hector Fernandez <hector@iatec.biz> | 2020-07-06 17:22:17 +0200 |
---|---|---|
committer | Hector Fernandez <hector@iatec.biz> | 2020-07-06 17:22:17 +0200 |
commit | 1d51a80b57cc8c80c78d67c85290503997060e9e (patch) | |
tree | b39712b4f90369280e75adfee3ef81a128dfe3e8 /test-cli/test/tests/qaudio.py | |
parent | cd3c8dd78e3bcdd442967583e3814db3701871c0 (diff) | |
download | board-1d51a80b57cc8c80c78d67c85290503997060e9e.zip board-1d51a80b57cc8c80c78d67c85290503997060e9e.tar.gz board-1d51a80b57cc8c80c78d67c85290503997060e9e.tar.bz2 |
Modified paths of ram and nfs temporary folders.
Diffstat (limited to 'test-cli/test/tests/qaudio.py')
-rw-r--r-- | test-cli/test/tests/qaudio.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test-cli/test/tests/qaudio.py b/test-cli/test/tests/qaudio.py index f7ae33c..bfbb051 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 time def calc_audio_duration(fname): @@ -28,15 +27,15 @@ class Qaudio(unittest.TestCase): def execute(self): # analize audio file recordtime = calc_audio_duration("/var/lib/hwtest-files/dtmf-13579.wav") + 0.15 - # wait time before playing - time.sleep(1) + # previous play to estabilise audio lines + sh.aplay("/var/lib/hwtest-files/dtmf-13579.wav") # play and record 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) + p2 = sh.arecord("-r", 8000, "-d", recordtime, "/mnt/station_ramdisk/recorded.wav", _bg=True) p1.wait() p2.wait() if p1.exit_code == 0 and p2.exit_code == 0: - p = sh.multimon("-t", "wav", "-a", "DTMF", "/tmp/station/recorded.wav", "-q") + p = sh.multimon("-t", "wav", "-a", "DTMF", "/mnt/station_ramdisk/recorded.wav", "-q") if p.exit_code == 0: lines = p.stdout.decode('ascii').splitlines() self.__dtmf_secuence_result = [] @@ -49,6 +48,7 @@ class Qaudio(unittest.TestCase): if a != b: self.fail("failed: sent and received DTMF sequence don't match.") else: + print(self.__dtmf_secuence_result) self.fail("failed: received DTMF sequence is shorter than expected.") else: self.fail("failed: unable to use multimon command.") |