Commit 18c1ce7
mtest: fix building of all test deps for --suite
The previous commit eb1e52a introduced
a variable `rebuild_only_tests` to fix various edge cases in
rebuild_deps.
In particular, if all tests are selected anyway, rebuild_deps prior
to the introduction of `rebuild_only_tests` would potentially
create a huge list of targets, which may overflow the
ARG_MAX limit.
For that case `rebuild_only_tests` was introduced and is set to an empty list, which means that rebuild_deps falls back to the `meson-test-prereq` ninja target, that already contains the necessary targets.
This is wrong, though, when `meson test` is executed with the "--suite"
option. In that case, the user requested a particular subset of the
tests, but `rebuild_only_tests` will be set to an empty list anyway,
which means the `meson-test-prereq` target is executed, which contains
the targets for all tests.
Instead, `rebuild_only_tests` should only be set to an empty list,
when the selected tests are identical to the complete list of available
tests: `tests == self.tests`
Since after this commit we compare directly to the result of `self.get_tests()`, this
will do the correct thing for all other options, which change or filter
the list of selected tests (e.g. `self.options.args`, `self.options.slice`).1 parent f314f68 commit 18c1ce7
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
1894 | | - | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
1895 | 1900 | | |
1896 | 1901 | | |
1897 | 1902 | | |
| |||
0 commit comments