You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
project('subprjfail', 'c')
|
|
|
|
|
|
|
|
test('subprjfail-failing_test',
|
|
|
|
executable('failing_test', 'failing_test.c'),
|
|
|
|
suite : 'fail')
|
mtest: check for an empty suite list
For consistency, it can be useful to have an explicit empty test suite list
for a test:
test('test-name', binary, suite: [])
This currently passes meson but fails when running meson tests:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/mesonbuild/mesonmain.py", line 122, in run
return options.run_func(options)
File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 1005, in run
return th.doit()
File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 756, in doit
self.run_tests(tests)
File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 896, in run_tests
visible_name = self.get_pretty_suite(test)
File "/usr/lib/python3.7/site-packages/mesonbuild/mtest.py", line 875, in get_pretty_suite
rv = TestHarness.split_suite_string(test.suite[0])[0]
IndexError: list index out of range
Fix it by simply checking for the test suite to be a valid list we can pass on
Fixes #5340
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
6 years ago
|
|
|
|
|
|
|
test('subprjfail-failing_test_no_suite',
|
|
|
|
executable('failing_test_no_suite', 'failing_test.c'),
|
|
|
|
suite : [])
|