[glib/glib-2-64: 1/3] gio: use TAPTestRunner in the memory monitor tests
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-64: 1/3] gio: use TAPTestRunner in the memory monitor tests
- Date: Thu, 14 May 2020 14:07:12 +0000 (UTC)
commit 5903b751856dc48250ed60732529040ca2065dea
Author: Ross Burton <ross burton intel com>
Date: Tue Apr 7 15:45:06 2020 +0100
gio: use TAPTestRunner in the memory monitor tests
There are two memory monitor tests that use Python's unittest module directly,
but GLib tests should be outputting TAP. Use the embedded TAPTestRunner to
ensure that TAP is output for these tests too.
gio/tests/memory-monitor-dbus.py.in | 5 +++--
gio/tests/memory-monitor-portal.py.in | 5 +++--
gio/tests/meson.build | 3 ++-
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gio/tests/memory-monitor-dbus.py.in b/gio/tests/memory-monitor-dbus.py.in
index 675024a50..bb9d7d5b7 100755
--- a/gio/tests/memory-monitor-dbus.py.in
+++ b/gio/tests/memory-monitor-dbus.py.in
@@ -21,6 +21,8 @@ import fcntl
import os
import time
+import taptestrunner
+
from gi.repository import GLib
from gi.repository import Gio
@@ -98,5 +100,4 @@ class TestLowMemoryMonitor(dbusmock.DBusTestCase):
if __name__ == '__main__':
- # avoid writing to stderr
- unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
+ unittest.main(testRunner=taptestrunner.TAPTestRunner())
diff --git a/gio/tests/memory-monitor-portal.py.in b/gio/tests/memory-monitor-portal.py.in
index 37c206fd4..214e18c93 100755
--- a/gio/tests/memory-monitor-portal.py.in
+++ b/gio/tests/memory-monitor-portal.py.in
@@ -21,6 +21,8 @@ import fcntl
import os
import time
+import taptestrunner
+
from gi.repository import GLib
from gi.repository import Gio
@@ -114,5 +116,4 @@ class TestLowMemoryMonitorPortal(dbusmock.DBusTestCase):
if __name__ == '__main__':
- # avoid writing to stderr
- unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout, verbosity=2))
+ unittest.main(testRunner=taptestrunner.TAPTestRunner())
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 788cf978b..48891b06b 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -531,8 +531,9 @@ if installed_tests_enabled
cdata = configuration_data()
cdata.set('installed_tests_dir', installed_tests_execdir)
cdata.set('program', memory_monitor_test + '.py')
+ cdata.set('env', '')
configure_file(
- input: installed_tests_template,
+ input: installed_tests_template_tap,
output: memory_monitor_test + '.test',
install_dir: installed_tests_metadir,
configuration: cdata
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]