Skip to content

Commit

Permalink
Tell Meson which tests produce TAP output
Browse files Browse the repository at this point in the history
GLib, and the Python tests with the taptestrunner.py we copy-pasta, emit
output that conforms to Test Anything Protocol
<https://testanything.org/>, allowing the runner to know the number of
subtests and which of them passed.

With this information, Meson can produce this information to the console
when you run `meson test`:

 1/20 eos-updater:libeos-updater-util / avahi-service-file    OK   0.04s   4 subtests passed
 2/20 eos-updater:libeos-updater-util / ostree-util           OK   0.03s   1 subtests passed

I believe it also includes this information in the JUnit XML it emits
and that our Jenkins consumes.

https://phabricator.endlessm.com/T35247
  • Loading branch information
wjt committed Mar 11, 2024
1 parent 3a1cc9c commit 35d99a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions libeos-updater-flatpak-installer/tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ foreach test_name, extra_args : test_programs
env: envs,
suite: suite,
timeout: extra_args.get('slow', false) ? 360 : 60,
protocol: 'tap',
)
endforeach
2 changes: 1 addition & 1 deletion libeos-updater-util/tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ foreach test_name, extra_args : test_programs
)

suite = ['libeos-updater-util'] + extra_args.get('suite', [])
test(test_name, exe, env : envs, suite : suite)
test(test_name, exe, env : envs, suite : suite, protocol : 'tap')
endforeach
2 changes: 2 additions & 0 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ foreach test_name, extra_args : test_programs
suite: ['eos-updater'] + extra_args.get('suite', []),
timeout: extra_args.get('slow', false) ? 600 : 60,
is_parallel: extra_args.get('parallel', true),
protocol: 'tap',
)
endforeach

Expand Down Expand Up @@ -160,6 +161,7 @@ foreach test_name, extra_args : python_tests
args: main,
env: envs,
suite: ['eos-updater'] + extra_args.get('suite', []),
protocol: 'tap',
)
endif
endforeach
Expand Down

0 comments on commit 35d99a7

Please sign in to comment.