[gnome-bluetooth/wip/hadess/bluetooth-off-turn-off] tests: Print out stdout on error
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth/wip/hadess/bluetooth-off-turn-off] tests: Print out stdout on error
- Date: Fri, 10 Dec 2021 18:13:24 +0000 (UTC)
commit 509f876e41ef78ac104eb9c73e97ec59b3f5f40f
Author: Bastien Nocera <hadess hadess net>
Date: Tue Nov 23 17:36:37 2021 +0100
tests: Print out stdout on error
tests/integration-test | 5 ++---
1 file 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'))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]