mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-11 05:17:44 +03:00
meson: Assign tests a suite based on their directory
This can be used to run only a subset of tests, e.g. "meson test -C build --suite journal" to run only the journal unit tests.
This commit is contained in:
parent
5932c87000
commit
c3191c6d4f
@ -3794,6 +3794,10 @@ foreach tuple : tests
|
|||||||
type = ''
|
type = ''
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
suite = fs.name(fs.parent('@0@'.format(sources[0])))
|
||||||
|
# FIXME: Use str.replace() with meson >= 0.58.0
|
||||||
|
suite = suite.split('sd-')[-1]
|
||||||
|
|
||||||
if condition == '' or conf.get(condition) == 1
|
if condition == '' or conf.get(condition) == 1
|
||||||
exe = executable(
|
exe = executable(
|
||||||
name,
|
name,
|
||||||
@ -3816,7 +3820,8 @@ foreach tuple : tests
|
|||||||
elif want_tests != 'false'
|
elif want_tests != 'false'
|
||||||
test(name, exe,
|
test(name, exe,
|
||||||
env : test_env,
|
env : test_env,
|
||||||
timeout : timeout)
|
timeout : timeout,
|
||||||
|
suite : suite)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
message('Not compiling @0@ because @1@ is not true'.format(name, condition))
|
message('Not compiling @0@ because @1@ is not true'.format(name, condition))
|
||||||
|
Loading…
Reference in New Issue
Block a user