forked from mesonbuild/meson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mtest: only build what is needed for the tests
It is a usual workflow to fix something and retest to see if it is fixed using a particular test. When tests start to become numerous, it becomes time consuming for "meson test" to relink all of them (and in fact rebuild the whole project) where the user has already specified the tests they want to run, as well as the tests' dependencies. Teach meson to be smart and only build what is needed for the test (or suite) that were specified. Fixes: mesonbuild#7473 Related: mesonbuild#7830
- Loading branch information
Showing
3 changed files
with
61 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## `meson test` only rebuilds test dependencies | ||
|
||
Until now, `meson test` rebuilt the whole project independent of the | ||
requested tests and their dependencies. With this release, `meson test` | ||
will only rebuild what is needed for the tests or suites that will be run. | ||
This feature can be used, for example, to speed up bisecting regressions | ||
using commands like the following: | ||
|
||
git bisect start <broken commit> <working commit> | ||
git bisect run meson test <failing test name> | ||
|
||
This would find the broken commit automatically while at each step | ||
rebuilding only those pieces of code needed to run the test. | ||
|
||
However, this change could cause failures if dependencies are not | ||
specified correctly in `meson.build`. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters