aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 340a17ceb9b..cf311a8ec70 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -32,6 +32,8 @@ from mach.decorators import (
CommandProvider,
Command,
)
+
+import servo.util
import tidy
from servo.command_base import (
@@ -245,10 +247,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)