From 59c2dc5df280913f22d859bd2cc11fcfa970ba30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 27 Jan 2021 23:59:15 +0100 Subject: [PATCH] tests/fprintd: Use output checker in FPrintdUtilsTest --- tests/fprintd.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/fprintd.py b/tests/fprintd.py index 2d86de6..290ff49 100644 --- a/tests/fprintd.py +++ b/tests/fprintd.py @@ -36,6 +36,7 @@ import dbusmock import gi gi.require_version('FPrint', '2.0') from gi.repository import GLib, Gio, FPrint +from output_checker import OutputChecker import cairo try: @@ -2832,20 +2833,23 @@ class FPrintdUtilsTest(FPrintdVirtualStorageDeviceBaseTest): if os.path.exists(valgrind): argv.insert(2, '--suppressions=%s' % valgrind) self.valgrind = True + output = OutputChecker() self.utils_proc[name] = subprocess.Popen(argv, env=env, - stdout=None, + stdout=output.fd, stderr=subprocess.STDOUT) + output.writer_attached() self.addCleanup(self.utils_proc[name].wait) self.addCleanup(self.utils_proc[name].terminate) - return self.utils_proc[name] + self.addCleanup(output.assert_closed) + return self.utils_proc[name], output def test_vanished_client_operation_is_cancelled(self): self.device.Claim('(s)', self.get_current_user()) self.enroll_image('whorl') self.device.Release() - verify = self.util_start('verify') + verify, output = self.util_start('verify') time.sleep(1) verify.terminate() self.assertLess(verify.wait(), 128)