diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-06-29 12:45:45 +0200 |
---|---|---|
committer | Martin Robinson <mrobinson@igalia.com> | 2023-06-30 09:46:45 +0200 |
commit | ddc79946733cdfed32f5366ba7138f1d91dc2ea2 (patch) | |
tree | cd4c8c7c10f69fb1bceb59dc37fcd9bb7e020079 /python/servo/testing_commands.py | |
parent | a725380db0b9fba31993409f7d0f4b2d11ca8f7d (diff) | |
download | servo-ddc79946733cdfed32f5366ba7138f1d91dc2ea2.tar.gz servo-ddc79946733cdfed32f5366ba7138f1d91dc2ea2.zip |
Update mozangle, cc, and cmake
This also moves some environment variable configuration to the shared
`build_env()` method, because previously clang was only being chosen for
running `./mach build` and not `./mach test-unit` which was leading to
rebuilds and thus build failures when running `test-unit`. I guess the
cmake crate does not expect the compiler to change between subsequent
runs.
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r-- | python/servo/testing_commands.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index e91e642605e..f164ab40223 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -31,6 +31,8 @@ from mach.decorators import ( CommandProvider, Command, ) + +import servo.util import tidy from servo.command_base import ( @@ -260,10 +262,20 @@ class MachCommands(CommandBase): if nocapture: args += ["--", "--nocapture"] + # We are setting is_build here to true, because running `cargo test` can trigger builds. + env = self.build_env(is_build=True) + + # on MSVC, we need some DLLs in the path. They were copied + # in to the servo.exe build dir, so just point PATH to that. + # TODO(mrobinson): This should be removed entirely. + if "msvc" in servo.platform.host_triple(): + servo.util.prepend_paths_to_env( + env, "PATH", path.dirname(self.get_binary_path(False, False))) + return self.run_cargo_build_like_command( "bench" if bench else "test", args, - env=self.build_env(test_unit=True), + env=env, with_layout_2020=with_layout_2020, **kwargs) |