[tracker/wip/carlosg/junit: 9/11] tests: Use TapTestRunner in functional tests if available
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/junit: 9/11] tests: Use TapTestRunner in functional tests if available
- Date: Sun, 13 Dec 2020 19:02:58 +0000 (UTC)
commit fed034a30de41e55eb6bdaa5de3714165e31cba2
Author: Carlos Garnacho <carlosg gnome org>
Date: Sat Dec 12 20:15:26 2020 +0100
tests: Use TapTestRunner in functional tests if available
We want to unify test outputs into a format that we can convert to
JUnit. As the GLib tests already output TAP, and meson converts TAP
to JUnit, add optional support so our functional tests also output
TAP.
This is meant to be enabled in CI.
tests/functional-tests/fixtures.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/tests/functional-tests/fixtures.py b/tests/functional-tests/fixtures.py
index 8c16b40b4..2794bf1c7 100644
--- a/tests/functional-tests/fixtures.py
+++ b/tests/functional-tests/fixtures.py
@@ -63,7 +63,16 @@ def tracker_test_main():
handlers=[handler_stderr, handler_stdout],
format='%(message)s')
- ut.main(verbosity=2)
+ runner = None
+
+ try:
+ from tap import TAPTestRunner
+ runner = TAPTestRunner()
+ runner.set_stream(True)
+ except ImportError as e:
+ log.info('No TAP test runner found: %s', e)
+
+ ut.main(testRunner=runner, verbosity=2)
class TrackerSparqlDirectTest(ut.TestCase):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]