diff options
author | Manel Caro <mcaro@iseebcn.com> | 2019-03-09 21:38:10 +0100 |
---|---|---|
committer | Manel Caro <mcaro@iseebcn.com> | 2019-03-09 21:38:10 +0100 |
commit | fa1e1822769d735745869ef02671408d006f2b13 (patch) | |
tree | ed36d7f424d7535eff2bf5d089847dc1fe3a31be /test-cli/test/tests | |
parent | e4366bb1f2dc3a43a1289f6f76967f1005278954 (diff) | |
download | board-fa1e1822769d735745869ef02671408d006f2b13.zip board-fa1e1822769d735745869ef02671408d006f2b13.tar.gz board-fa1e1822769d735745869ef02671408d006f2b13.tar.bz2 |
Change some test
Update some tests
Diffstat (limited to 'test-cli/test/tests')
23 files changed, 33 insertions, 37 deletions
diff --git a/test-cli/test/tests/.qaudio.py.swp b/test-cli/test/tests/.qaudio.py.swp Binary files differnew file mode 100644 index 0000000..7873edb --- /dev/null +++ b/test-cli/test/tests/.qaudio.py.swp diff --git a/test-cli/test/tests/__pycache__/__init__.cpython-35.pyc b/test-cli/test/tests/__pycache__/__init__.cpython-35.pyc Binary files differindex 8ec8ff0..53465da 100644 --- a/test-cli/test/tests/__pycache__/__init__.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/__init__.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qamp.cpython-35.pyc b/test-cli/test/tests/__pycache__/qamp.cpython-35.pyc Binary files differnew file mode 100644 index 0000000..76018fd --- /dev/null +++ b/test-cli/test/tests/__pycache__/qamp.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qaudio.cpython-35.pyc b/test-cli/test/tests/__pycache__/qaudio.cpython-35.pyc Binary files differindex 930961a..774488b 100644 --- a/test-cli/test/tests/__pycache__/qaudio.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qaudio.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qbutton.cpython-35.pyc b/test-cli/test/tests/__pycache__/qbutton.cpython-35.pyc Binary files differindex fb10f23..91fa3ef 100644 --- a/test-cli/test/tests/__pycache__/qbutton.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qbutton.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qduplex_ser.cpython-35.pyc b/test-cli/test/tests/__pycache__/qduplex_ser.cpython-35.pyc Binary files differindex 0cbd3af..f8f4f93 100644 --- a/test-cli/test/tests/__pycache__/qduplex_ser.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qduplex_ser.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qeeprom.cpython-35.pyc b/test-cli/test/tests/__pycache__/qeeprom.cpython-35.pyc Binary files differindex 7a3a5c5..4dfecd2 100644 --- a/test-cli/test/tests/__pycache__/qeeprom.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qeeprom.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qethernet.cpython-35.pyc b/test-cli/test/tests/__pycache__/qethernet.cpython-35.pyc Binary files differindex 0c7570c..257e244 100644 --- a/test-cli/test/tests/__pycache__/qethernet.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qethernet.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qflash.cpython-35.pyc b/test-cli/test/tests/__pycache__/qflash.cpython-35.pyc Binary files differnew file mode 100644 index 0000000..a4fe2bc --- /dev/null +++ b/test-cli/test/tests/__pycache__/qflash.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qi2c.cpython-35.pyc b/test-cli/test/tests/__pycache__/qi2c.cpython-35.pyc Binary files differindex 2fdf24d..0f05f5a 100644 --- a/test-cli/test/tests/__pycache__/qi2c.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qi2c.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qiperf.cpython-35.pyc b/test-cli/test/tests/__pycache__/qiperf.cpython-35.pyc Binary files differindex b5ac915..ccfc5ed 100644 --- a/test-cli/test/tests/__pycache__/qiperf.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qiperf.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qram.cpython-35.pyc b/test-cli/test/tests/__pycache__/qram.cpython-35.pyc Binary files differindex 6e68601..e895f4b 100644 --- a/test-cli/test/tests/__pycache__/qram.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qram.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qrtc.cpython-35.pyc b/test-cli/test/tests/__pycache__/qrtc.cpython-35.pyc Binary files differindex 81badbb..0955b5e 100644 --- a/test-cli/test/tests/__pycache__/qrtc.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qrtc.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qscreen.cpython-35.pyc b/test-cli/test/tests/__pycache__/qscreen.cpython-35.pyc Binary files differindex cc3a852..001759e 100644 --- a/test-cli/test/tests/__pycache__/qscreen.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qscreen.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qserial.cpython-35.pyc b/test-cli/test/tests/__pycache__/qserial.cpython-35.pyc Binary files differindex d4494a8..220e137 100644 --- a/test-cli/test/tests/__pycache__/qserial.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qserial.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qusb.cpython-35.pyc b/test-cli/test/tests/__pycache__/qusb.cpython-35.pyc Binary files differindex 8f1ec80..ce8056f 100644 --- a/test-cli/test/tests/__pycache__/qusb.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qusb.cpython-35.pyc diff --git a/test-cli/test/tests/__pycache__/qwifi.cpython-35.pyc b/test-cli/test/tests/__pycache__/qwifi.cpython-35.pyc Binary files differindex f894b13..a9e848e 100644 --- a/test-cli/test/tests/__pycache__/qwifi.cpython-35.pyc +++ b/test-cli/test/tests/__pycache__/qwifi.cpython-35.pyc diff --git a/test-cli/test/tests/qamp.py b/test-cli/test/tests/qamp.py index 58f4daf..9fcd6d2 100644 --- a/test-cli/test/tests/qamp.py +++ b/test-cli/test/tests/qamp.py @@ -84,3 +84,4 @@ class Qamp(unittest.TestCase): self.fail("failed: UNDERCURRENT DETECTED ( {} )".format(self._current)) return -1 + diff --git a/test-cli/test/tests/qaudio.py b/test-cli/test/tests/qaudio.py index b262c2d..a1572ca 100644 --- a/test-cli/test/tests/qaudio.py +++ b/test-cli/test/tests/qaudio.py @@ -13,32 +13,25 @@ class Qaudio(unittest.TestCase): self.__refSum = 25 # 1+3+5+7+9 def execute(self): - str_cmd = "amixer -c 0 sset 'PCM' 100 2> /dev/null" # .format(self.__dtmfFile) - #Some cases de volume level is not enough to the tes. It needs to be increased - volume_up = SysCommand("volume_up", str_cmd) - if volume_up.execute() == 0: - str_cmd = "aplay test/files/dtmf-13579.wav 2> /dev/null & arecord -r 8000 -d 1 recorded.wav 2> /dev/null" #.format(self.__dtmfFile) - audio_loop = SysCommand("audio_loop", str_cmd) - if audio_loop.execute() == 0: - lines = audio_loop.getOutput().splitlines() - str_cmd = "multimon -t wav -a DTMF recorded.wav -q 2> /dev/null" - dtmf_decoder = SysCommand("dtmf_decoder", str_cmd) - if dtmf_decoder.execute() == 0: - self.__raw_out = dtmf_decoder.getOutput() - if self.__raw_out == "": - return -1 - lines = dtmf_decoder.getOutput().splitlines() - for i in range(0, 5): - aux=[int(s) for s in lines[i].split() if s.isdigit()] - self.__sum=self.__sum+aux[0] - self.failUnless(self.__sum == self.__refSum), "failed: incorrect dtmf code" + str(self.__sum) - else: - self.fail("failed: fail reading recorded file") + str_cmd = "aplay test/files/dtmf-13579.wav 2> /dev/null & arecord -r 8000 -d 1 recorded.wav 2> /dev/null" #.format(self.__dtmfFile) + audio_loop = SysCommand("command-name", str_cmd) + if audio_loop.execute() == 0:# BUG: Returns -1 but work + lines = audio_loop.getOutput().splitlines() + str_cmd = "multimon -t wav -a DTMF recorded.wav -q 2> /dev/null" + dtmf_decoder = SysCommand("command-name", str_cmd) + if dtmf_decoder.execute() == 0: # BUG: Returns -1 but work + self.__raw_out = dtmf_decoder.getOutput() + if self.__raw_out == "": return -1 + lines = dtmf_decoder.getOutput().splitlines() + for i in range(0, 5): + aux=[int(s) for s in lines[i].split() if s.isdigit()] + self.__sum=self.__sum+aux[0] + self.failUnless(self.__sum == self.__refSum), "failed: incorrect dtmf code" + str(self.__sum) else: - self.fail("failed: fail playing/recording file") + self.fail("failed: fail reading recorded file") return -1 else: - self.fail("failed: could not increase loud level") + self.fail("failed: fail playing/recording file") return -1 return 0 diff --git a/test-cli/test/tests/qbutton.py b/test-cli/test/tests/qbutton.py index 1fb204a..72a897e 100644 --- a/test-cli/test/tests/qbutton.py +++ b/test-cli/test/tests/qbutton.py @@ -21,6 +21,9 @@ class Qbutton(unittest.TestCase): disable_pmic = SysCommand("disable_pmic", str_cmd) disable_pmic.execute() # BUG: REPEAT THIS EXECUTION TWICE BECAUSE FIRST TIME IT RETURNS AN ERROR + led_on="echo 1 > /sys/class/leds/red\:usbhost/brightness" + ledon = SysCommand("led_on", led_on) + ledon.execute() time.sleep(0.1) disable_pmic.execute() if disable_pmic.execute() == 0: diff --git a/test-cli/test/tests/qflash.py b/test-cli/test/tests/qflash.py index 660e1c0..cdc4109 100644 --- a/test-cli/test/tests/qflash.py +++ b/test-cli/test/tests/qflash.py @@ -11,6 +11,9 @@ class Qflasher(unittest.TestCase): if model.find("IGEP0046") == 0: self._flash_method = "mx6" self._binlocation="/boot/" + elif model.find("IGEP0000") == 0: + self._flash_method = "mx6" + self._binlocation="/boot/" elif model.find("IGEP0034") == 0: self._flash_method = "nandti" self._binlocation = "/boot/" @@ -71,4 +74,4 @@ class Qflasher(unittest.TestCase): self.fail("failed: could not complete nandtest mtd0") else: - self.fail("failed: could not find flash method")
\ No newline at end of file + self.fail("failed: could not find flash method") diff --git a/test-cli/test/tests/qscreen.py b/test-cli/test/tests/qscreen.py index 3beff83..b8a5a48 100644 --- a/test-cli/test/tests/qscreen.py +++ b/test-cli/test/tests/qscreen.py @@ -11,20 +11,15 @@ class Qscreen(unittest.TestCase): self._testMethodDoc = testname def execute(self): - str_cmd = "fbi -T 1 --noverbose -d /dev/{} test/files/test_pattern.png 2> /dev/null".format(self.__display) + str_cmd = "fbi -T 1 --noverbose -d /dev/{} test/files/test_pattern.png".format(self.__display) display_image = SysCommand("display_image", str_cmd) - if display_image.execute() == 0: - str_cmd = "ls /dev/v4l/by-id/usb-Creative_Technology*" - camera_check = SysCommand("camera_check", str_cmd) - if camera_check.execute() == 0: - test_screen = pattern_detect(1) - if not test_screen=="0": - self.fail("failed: {}".format(test_screen)) - str_cmd= "fbi -T 1 /home/root/result_hdmi_img.jpg -d /dev/fb0 --noverbose -a" - show_img = SysCommand("show-image", str_cmd) - show_img.execute() - else: - self.fail("failed: camera not found. USB PROBLEM??") + if display_image.execute() == -1: + test_screen = pattern_detect(1) + if not test_screen=="0": + self.fail("failed: {}".format(test_screen)) + str_cmd= "fbi -T 1 /home/root/result_hdmi_img.jpg -d /dev/fb0 --noverbose -a" + show_img = SysCommand("show-image", str_cmd) + show_img.execute() else: self.fail("failed: could not display the image") try: diff --git a/test-cli/test/tests/qwifi.py b/test-cli/test/tests/qwifi.py index 8235937..d08149b 100644 --- a/test-cli/test/tests/qwifi.py +++ b/test-cli/test/tests/qwifi.py @@ -42,3 +42,4 @@ class Qwifi(unittest.TestCase): else: self.fail("failed: ping to server {}".format(self._serverip)) + |