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/qscreen.py | |
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/qscreen.py')
-rw-r--r-- | test-cli/test/tests/qscreen.py | 21 |
1 files changed, 8 insertions, 13 deletions
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: |