-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't build tests by default in ninja #6511
Conversation
This pull request introduces 1 alert when merging aec3478 into 03065f2 - view on LGTM.com new alerts:
|
Is this a summary of functionality this PR adds?
this appears to be done new for this PR by:
such that test_shaky is not built by ninja -C build
# or
meson install -C build but would be built by meson test -C build
# or
ninja -C build test Currently my approach to this is to enclose user-annoying tests like: if get_option('dev')
executable('test_shaky')
endif |
Ideally this would have a follow up of "don't build targets that aren't installed by default", so that if you had helper libraries only used in tests those also wouldn't get built by default. This is for me, motivated by the fact that mesa has a lot of test-only helper libraries that all have to be carefully guarded, and not having to do that guarding would be nice. |
aec3478
to
a2985cb
Compare
This pull request introduces 1 alert when merging a2985cb into 4597235 - view on LGTM.com new alerts:
|
a2985cb
to
ed01153
Compare
0c8c1d5
to
ef87c6a
Compare
I've adde a bunch of stuff to make working with run_project_tests more pleasant, as I had to run a few tests over and over on windows to figure some of the problems out. |
This pull request introduces 1 alert when merging ef87c6a into 321774d - view on LGTM.com new alerts:
|
ef87c6a
to
683acb1
Compare
…d VS require additional work)
One for benchmarks and one for for tests, with the added bonus that the names are now safely meson- prefaced.
sets have logarithmic lookup times, while lists have a linear lookup
If there are newlines in the lines then the no_rebuild_stdout will not work
683acb1
to
c30e8b0
Compare
What's the status of this PR? Apart from rebasing, what are the outstanding issues? |
Featurewise this is ok, but the failing tests need to be fixed at least. |
I need to find a chance to rebase it and fix the failing tests, just not right at the top of queue right now |
Set `build_by_default` to `false` for the unit test executable which in the future should cause tests to be only built if they are gonna run when mesonbuild/meson#6511 is merged
@dcbaker, @jpakkane, I came across this PR and created #11317 to try and help with rebasing and running tests. Everything seems to be consistent between |
@dcbaker can we offer some virtual 🍪 in exchange for updating/landing this PR? |
Closing in favor of #11317, though even that one might be unnecessary given that meson has |
When running `ninja all` we shouldn't build testsuite programs as these might not be wanted e.g. in order to just install the project. We do want them to be built when running `ninja test`. Since meson 0.63 we actually have a dedicated ninja alias for test dependencies -- move these from the "all" rule to the dedicated test/benchmark rules. Closes: mesonbuild#1704 Closes: mesonbuild#1949 Closes: mesonbuild#2518 Closes: mesonbuild#3662 Closes: mesonbuild#5728 Closes: mesonbuild#5867 Closes: mesonbuild#6511 Closes: mesonbuild#11317 Closes: mesonbuild#13378
This is a rebased version of #5728, with the changes I requested applied on top. The idea is that tests and benchmarks are removed from the all target, and are placed in their own
meson-build-tests
andmeson-build-benchmarks
targets, which thetest
andbenchmark
targets depend on. This allows us to avoid building test executables by default.I'd like to follow this up with a change that allows targets that are not installed to not build by default.
Fixes #2518
Fixes #1704