diff --git a/tests/qvctests/integ.py b/tests/qvctests/integ.py index b2cf511..e1a39ec 100644 --- a/tests/qvctests/integ.py +++ b/tests/qvctests/integ.py @@ -79,7 +79,7 @@ def test_010_screenshare(self): '@default', target=self.screenshare.name) p = self.view.run('qubes-video-companion screenshare', - passio_popen=True) + passio_popen=True, passio_stderr=True) # wait for device to appear, or a timeout self.wait_for_video0(self.view) self.loop.run_until_complete(self.wait_for_session(self.view)) @@ -95,7 +95,14 @@ def test_010_screenshare(self): self.click_stop(self.screenshare, 'screenshare') # wait for device to disappear, or a timeout self.wait_for_video0_disconnect(self.view) - self.assertEqual(p.wait(), 0) + stdout, stderr = p.communicate() + if p.returncode != 0: + self.fail("'qubes-video-companion screenshare' failed ({}): {} {}".format( + p.returncode, stdout, stderr)) + else: + # just print + print(stdout) + print(stderr) def test_020_webcam(self): """Two stages test: screen share and then webcam @@ -115,15 +122,19 @@ def test_020_webcam(self): '@default', target=self.proxy.name) p = self.proxy.run('qubes-video-companion screenshare', - passio_popen=True) + passio_popen=True, passio_stderr=True) # wait for device to appear, or a timeout self.wait_for_video0(self.proxy) self.loop.run_until_complete(asyncio.sleep(3)) - self.assertIsNone(p.returncode) + if p.returncode is not None: + self.fail("'qubes-video-companion screenshare' exited early ({}): {} {}".format( + p.returncode, *p.communicate())) p2 = self.view.run('qubes-video-companion webcam', - passio_popen=True) + passio_popen=True, passio_stderr=True) self.wait_for_video0(self.view) - self.assertIsNone(p2.returncode) + if p2.returncode is not None: + self.fail("'qubes-video-companion webcam' exited early ({}): {} {}".format( + p2.returncode, *p2.communicate())) source_image = self.capture_from_screen(self.screenshare) destination_image = self.capture_from_video(self.view) @@ -132,8 +143,22 @@ def test_020_webcam(self): self.click_stop(self.proxy, 'webcam') self.click_stop(self.screenshare, 'screenshare') self.wait_for_video0_disconnect(self.proxy) - self.assertEqual(p2.wait(), 0) - self.assertEqual(p.wait(), 0) + stdout, stderr = p2.communicate() + if p2.returncode != 0: + self.fail("'qubes-video-companion screenshare' failed ({}): {} {}".format( + p2.returncode, stdout, stderr)) + else: + # just print + print(stdout) + print(stderr) + stdout, stderr = p.communicate() + if p.returncode != 0: + self.fail("'qubes-video-companion screenshare' failed ({}): {} {}".format( + p.returncode, stdout, stderr)) + else: + # just print + print(stdout) + print(stderr) def list_tests():