Improve ergonomics for running rusttests locally

RESOLVED FIXED in Firefox 65

Status

enhancement
RESOLVED FIXED
7 months ago
6 months ago

People

(Reporter: chmanchester, Assigned: chmanchester)

Tracking

Trunk
mozilla65
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(2 attachments)

Things are better as a result of bug 1505072, but the ergonomics aren't ideal still because one still needs to set a flag to run these locally. We would be able to get rid of this flag, except the code coverage builds want to run these tests during make check rather than a separate task. I think we should just move these to a separate task like the rest of the builds for consistency.
I propose that we remove the check for `MOZ_RUST_TESTS` in the emitter, so that we always output info about Rust tests to the backend:
https://dxr.mozilla.org/mozilla-central/rev/c291143e24019097d087f9307e59b49facaf90cb/python/mozbuild/mozbuild/frontend/emitter.py#1319

and also remove the `check::` rule currently in rules.mk so that the tests won't get run during a normal `make check`:
https://dxr.mozilla.org/mozilla-central/rev/c291143e24019097d087f9307e59b49facaf90cb/config/rules.mk#1063

Then in the root Makefile just add something like:
```
ifdef MOZ_RUST_TESTS
check:: recurse_rusttests
endif
```

So that builds with --enable-rust-tests that run `make check` will still run the tests.
I forgot to add: with those changes anyone should be able to run `mach build recurse_rusttests` to build and run these tests. We should still stick that behind a mach command for better ergonomics.
Assignee

Comment 3

7 months ago
Oh yeah, that sounds even better.
Assignee: nobody → cmanchester

Comment 6

6 months ago
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/de5d9f1a6e4a
Allow rusttests to run when requested without --enable-rust-tests. r=firefox-build-system-reviewers,ted
https://hg.mozilla.org/integration/autoland/rev/8e4063938d4b
Implement a mach wrapper for rusttests. r=firefox-build-system-reviewers,ted

Comment 7

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/de5d9f1a6e4a
https://hg.mozilla.org/mozilla-central/rev/8e4063938d4b
Status: NEW → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.