diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2019-05-01 10:04:50 +1000 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-02 22:12:58 +0300 |
commit | 70997ca969dab0de7a800af7f7c7d6c7e25cf4ac (patch) | |
tree | a3b6d99197344231afe8f29fe9e29c7b6362306e /docs/markdown/snippets | |
parent | ec757492bfa5431952ea2e4274368393885a3639 (diff) | |
download | meson-70997ca969dab0de7a800af7f7c7d6c7e25cf4ac.zip meson-70997ca969dab0de7a800af7f7c7d6c7e25cf4ac.tar.gz meson-70997ca969dab0de7a800af7f7c7d6c7e25cf4ac.tar.bz2 |
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>
Diffstat (limited to 'docs/markdown/snippets')
0 files changed, 0 insertions, 0 deletions