summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qaudio.py
diff options
context:
space:
mode:
authorManel Caro <mcaro@iseebcn.com>2020-03-04 17:46:36 +0100
committerManel Caro <mcaro@iseebcn.com>2020-03-04 17:46:36 +0100
commit09de774dcc1a5abc1c8f3a00fdb039aa3c522f52 (patch)
treec4bd3963d0df01d2e3a33732247388ed4651b186 /test-cli/test/tests/qaudio.py
parentb6932fbaf898724ae87c29f8965621610f377084 (diff)
downloadboard-09de774dcc1a5abc1c8f3a00fdb039aa3c522f52.zip
board-09de774dcc1a5abc1c8f3a00fdb039aa3c522f52.tar.gz
board-09de774dcc1a5abc1c8f3a00fdb039aa3c522f52.tar.bz2
SOPA Initial Commit
Diffstat (limited to 'test-cli/test/tests/qaudio.py')
-rw-r--r--test-cli/test/tests/qaudio.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/test-cli/test/tests/qaudio.py b/test-cli/test/tests/qaudio.py
index a1572ca..fe57be2 100644
--- a/test-cli/test/tests/qaudio.py
+++ b/test-cli/test/tests/qaudio.py
@@ -13,13 +13,14 @@ class Qaudio(unittest.TestCase):
self.__refSum = 25 # 1+3+5+7+9
def execute(self):
- str_cmd = "aplay test/files/dtmf-13579.wav 2> /dev/null & arecord -r 8000 -d 1 recorded.wav 2> /dev/null" #.format(self.__dtmfFile)
+ str_cmd = "aplay test/files/dtmf-13579.wav & arecord -r 8000 -d 1 recorded.wav" #.format(self.__dtmfFile)
audio_loop = SysCommand("command-name", str_cmd)
- if audio_loop.execute() == 0:# BUG: Returns -1 but work
+ if audio_loop.execute() == -1:# BUG: Returns -1 but work
lines = audio_loop.getOutput().splitlines()
- str_cmd = "multimon -t wav -a DTMF recorded.wav -q 2> /dev/null"
+ str_cmd = "multimon -t wav -a DTMF recorded.wav -q"
dtmf_decoder = SysCommand("command-name", str_cmd)
- if dtmf_decoder.execute() == 0: # BUG: Returns -1 but work
+ a=dtmf_decoder.execute()
+ if dtmf_decoder.execute() == -1: # BUG: Returns -1 but work
self.__raw_out = dtmf_decoder.getOutput()
if self.__raw_out == "":
return -1
@@ -34,4 +35,4 @@ class Qaudio(unittest.TestCase):
else:
self.fail("failed: fail playing/recording file")
return -1
- return 0
+ return 0 \ No newline at end of file