meson: Use 'tap' test protocol by default

Meson supports tap protocol results parsing, allowing us to track better
the tests that are running (and the ones that are actually skipped) without
manually parsing the test output.

However this also implies that using the verbose mode for a test doesn't
show its output by default (unless there are failures).
This commit is contained in:
Marco Trevisan (Treviño) 2022-12-15 21:40:35 +01:00
parent f21772ead0
commit 58031feb17
6 changed files with 24 additions and 2 deletions

View File

@ -1035,6 +1035,7 @@ foreach test_name, extra_args : gio_tests
endif
test(test_name, exe,
protocol : extra_args.get('protocol', test_protocol),
env : local_test_env,
timeout : timeout,
suite : suite,
@ -1059,6 +1060,7 @@ foreach test_name, extra_args : python_tests
test(
test_name,
python,
protocol : extra_args.get('protocol', test_protocol),
depends: depends,
args: ['-B', files(test_name)],
env: test_env,

View File

@ -398,6 +398,7 @@ foreach test_name, extra_args : glib_tests
endforeach
test(test_name, exe,
protocol : extra_args.get('protocol', test_protocol),
depends : depends,
env : test_env,
timeout : timeout,
@ -444,6 +445,7 @@ foreach test_name, extra_args : python_tests
test(
test_name,
python,
protocol : extra_args.get('protocol', test_protocol),
depends: depends,
args: ['-B', files(test_name)],
env: test_env,

View File

@ -115,6 +115,7 @@ foreach test_name, extra_args : gmodule_tests
test(test_name,
exe,
protocol : extra_args.get('protocol', test_protocol),
depends : depends,
env : test_env,
timeout : timeout,

View File

@ -186,7 +186,13 @@ foreach test_name, extra_args : gobject_tests
timeout = timeout * 10
endif
test(test_name, exe, env : test_env, timeout : timeout, suite : suite)
test(test_name,
exe,
protocol : extra_args.get('protocol', test_protocol),
env : test_env,
timeout : timeout,
suite : suite,
)
endforeach
foreach test_name, extra_args : python_tests
@ -200,6 +206,7 @@ foreach test_name, extra_args : python_tests
test(
test_name,
python,
protocol : extra_args.get('protocol', test_protocol),
depends: depends,
args: ['-B', files(test_name)],
env: test_env,

View File

@ -44,5 +44,11 @@ foreach test_name, extra_args : gthread_tests
suite += 'failing'
endif
test(test_name, exe, env : test_env, timeout : timeout, suite : suite)
test(test_name,
exe,
protocol : extra_args.get('protocol', test_protocol),
env : test_env,
timeout : timeout,
suite : suite,
)
endforeach

View File

@ -151,6 +151,10 @@ common_test_env = [
'MALLOC_CHECK_=2',
]
# Note: this may cause the tests output not to be printed when running in
# verbose mode, see https://github.com/mesonbuild/meson/issues/11185
# Can be changed it to 'exitcode' if required during development.
test_protocol = 'tap'
test_timeout = 30
test_timeout_slow = 90