diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-12-12 20:15:26 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2021-02-14 21:02:16 +0100 |
commit | 4bad28f5a5e1c9a6ecdd9d29faa2609db1cd7c60 (patch) | |
tree | 44213ce23ad5aa7a027c74b2ae574ffc621029f7 /tests/functional-tests | |
parent | 699367fb160b00192c0ec345440805de0fce2778 (diff) | |
download | tracker-4bad28f5a5e1c9a6ecdd9d29faa2609db1cd7c60.tar.gz |
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.
Diffstat (limited to 'tests/functional-tests')
-rw-r--r-- | tests/functional-tests/fixtures.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/functional-tests/fixtures.py b/tests/functional-tests/fixtures.py index e66cc1fa1..0f406a01e 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): |