diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-11-23 17:36:37 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-12-10 14:25:55 +0100 |
commit | 509f876e41ef78ac104eb9c73e97ec59b3f5f40f (patch) | |
tree | 076124bf87de2fe9effc49a01bbd80017279ab87 | |
parent | 34b19876ca695351750ba9703aa962ed6c99c61e (diff) | |
download | gnome-bluetooth-509f876e41ef78ac104eb9c73e97ec59b3f5f40f.tar.gz |
tests: Print out stdout on error
-rwxr-xr-x | tests/integration-test | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/integration-test b/tests/integration-test index edf42585..8f9b132f 100755 --- a/tests/integration-test +++ b/tests/integration-test @@ -175,7 +175,7 @@ class Tests(dbusmock.DBusTestCase): cls.start_system_bus() cls.dbus_con = cls.get_dbus(True) (cls.p_mock, cls.obj_bluez) = cls.spawn_server_template( - 'bluez5', {}, stdout=subprocess.PIPE) + 'bluez5', {}) cls.exec_path = [sys.argv[0]] if os.getenv('VALGRIND') != None: @@ -183,7 +183,6 @@ class Tests(dbusmock.DBusTestCase): @classmethod def tearDownClass(cls): - cls.p_mock.stdout.close() cls.p_mock.terminate() cls.p_mock.wait() @@ -197,7 +196,7 @@ class Tests(dbusmock.DBusTestCase): test_name = inspect.stack()[1][3] # And run the test with the same name in the OopTests class in a separate process out = subprocess.run(self.exec_path + ['OopTests.' + test_name], capture_output=True) - self.assertEqual(out.returncode, 0, "Running test " + test_name + " failed:" + out.stderr.decode('UTF-8')) + self.assertEqual(out.returncode, 0, "Running test " + test_name + " failed:" + out.stderr.decode('UTF-8') + '\n\n\nSTDOUT:\n' + out.stdout.decode('UTF-8')) if os.getenv('VALGRIND') != None: print(out.stderr.decode('UTF-8')) |