diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-11-03 09:05:17 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-03 09:05:17 -0500 |
commit | 4df647ed758730dd82a3eae5e78c296e495239d5 (patch) | |
tree | b3a652a6287f41221454b329f83fa17097c3b7d1 /python/servo/build_commands.py | |
parent | af1cd386f5bc000936267094c64114c264f77b38 (diff) | |
parent | a0ae81610d06ee58efe855260d190b2fa4e49db8 (diff) | |
download | servo-4df647ed758730dd82a3eae5e78c296e495239d5.tar.gz servo-4df647ed758730dd82a3eae5e78c296e495239d5.zip |
Auto merge of #19017 - tigercosmos:test, r=jdm
Print the full path for errors occurring in the servo crate
<!-- Please describe your changes on the following line: -->
`Cargo` will print the path where it runs.
Origin python script `cd` into the crate folder, so the root path is set in the crate.
Now I use `--manifest-path PATH` to `cargo build`, so the root path is at `servo`.
Origin path in error message:
```
error: expected one of `!` or `::`, found `#`
--> lib.rs:24:1
```
Now it would be:
```
error: expected one of `!` or `::`, found `use`
--> ports/geckolib/glue.rs:11:1
```
---
<!-- 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
- [X] These changes fix #9895 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- 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. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/19017)
<!-- Reviewable:end -->
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index c1b89b79205..bd7dd480fb7 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -176,12 +176,14 @@ class MachCommands(CommandBase): def build(self, target=None, release=False, dev=False, jobs=None, features=None, android=None, verbose=False, debug_mozjs=False, params=None, with_debug_assertions=False): + + opts = params or [] + opts += ["--manifest-path", self.servo_manifest()] + if android is None: android = self.config["build"]["android"] features = features or self.servo_features() - opts = params or [] - base_path = self.get_target_dir() release_path = path.join(base_path, "release", "servo") dev_path = path.join(base_path, "debug", "servo") @@ -326,8 +328,7 @@ class MachCommands(CommandBase): cargo_binary = "cargo" + BIN_SUFFIX status = call( - [cargo_binary, "build"] + opts, - env=env, cwd=self.servo_crate(), verbose=verbose) + [cargo_binary, "build"] + opts, env=env, verbose=verbose) elapsed = time() - build_start # Do some additional things if the build succeeded @@ -392,6 +393,8 @@ class MachCommands(CommandBase): ret = None opts = [] + opts += ["--manifest-path", self.cef_manifest()] + if jobs is not None: opts += ["-j", jobs] if verbose: @@ -415,10 +418,7 @@ class MachCommands(CommandBase): # common dependencies with the same flags. opts += ["--", "-C", "link-args=-Xlinker -undefined -Xlinker dynamic_lookup"] - with cd(path.join("ports", "cef")): - ret = call(["cargo", "rustc"] + opts, - env=env, - verbose=verbose) + ret = call(["cargo", "rustc"] + opts, env=env, verbose=verbose) elapsed = time() - build_start # Generate Desktop Notification if elapsed-time > some threshold value @@ -449,20 +449,20 @@ class MachCommands(CommandBase): ret = None opts = [] + opts += ["--manifest-path", self.geckolib_manifest()] features = [] + if jobs is not None: opts += ["-j", jobs] if verbose: opts += ["-v"] if release: opts += ["--release"] - if features: opts += ["--features", ' '.join(features)] build_start = time() - with cd(path.join("ports", "geckolib")): - ret = call(["cargo", "build"] + opts, env=env, verbose=verbose) + ret = call(["cargo", "build"] + opts, env=env, verbose=verbose) elapsed = time() - build_start # Generate Desktop Notification if elapsed-time > some threshold value |