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
Mach test cargo target dir #27169
Mach test cargo target dir #27169
Conversation
Thanks for the pull request, and welcome! The Servo team is excited to review your changes, and you should hear from @jdm (or someone else) soon. |
Heads up! This PR modifies the following files:
|
Woops, didn't create the branch from master. Let me rebase this. |
aad0de3
to
bcd6ef8
Compare
@bors-servo r+ |
|
Mach test cargo target dir <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [X] These changes do not require tests because they're about tooling <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> This change allows launching tests this way: ```sh CARGO_TARGET_DIR=other-dir ./mach test-wpt ... ``` The build and check commands already check for the presence of the `CARGO_TARGET_DIR` variable, but that wasn't the case for wpt tests. This resulted in an error about the `servo` executable not being found in `target/debug/servo`.
|
tests/wpt/run.py
Outdated
@@ -72,7 +73,10 @@ def set_defaults(kwargs): | |||
bin_name = "servo" | |||
if sys.platform == "win32": | |||
bin_name += ".exe" | |||
bin_path = servo_path("target", bin_dir, bin_name) | |||
if os.environ["CARGO_TARGET_DIR"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we need os.environ.get("CARGO_TARGET_DIR")
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, didn't test without the variable :) should be fixed!
bcd6ef8
to
9f224c4
Compare
@bors-servo r+ |
|
Mach test cargo target dir <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Either: --> - [X] These changes do not require tests because they're about tooling <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> This change allows launching tests this way: ```sh CARGO_TARGET_DIR=other-dir ./mach test-wpt ... ``` The build and check commands already check for the presence of the `CARGO_TARGET_DIR` variable, but that wasn't the case for wpt tests. This resulted in an error about the `servo` executable not being found in `target/debug/servo`.
|
|
./mach build -d
does not report any errors./mach test-tidy
does not report any errorsThis change allows launching tests this way:
The build and check commands already check for the presence of the
CARGO_TARGET_DIR
variable, but that wasn't the case for wpt tests. This resulted in an error about theservo
executable not being found intarget/debug/servo
.