aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
authorbors-servo <infra@servo.org>2023-05-25 13:43:45 +0200
committerGitHub <noreply@github.com>2023-05-25 13:43:45 +0200
commite9a7787a4d7e3a836853fd8b319951f20879fc83 (patch)
tree5d79d1569ae650279d4fa15bfe82ccc34a3a730c /python/servo/testing_commands.py
parente5004aaab1f439a81a3cb22cc9f36392fa8616c8 (diff)
parent7d20f16d9f746399811b1c4582e83efde1416bff (diff)
downloadservo-e9a7787a4d7e3a836853fd8b319951f20879fc83.tar.gz
servo-e9a7787a4d7e3a836853fd8b319951f20879fc83.zip
Auto merge of #29781 - mrobinson:bootstrap-gstreamer, r=mukilan
Implement `bootstrap-gstreamer` for all platforms This change makes it so that the Platform classes can now handle installing GStreamer dependencies and properly setting up the environment including when cross-compiling. For Windows and Linux, prepackaged GStreamer is now installed into `target/dependencies/gstreamer` when not installed system-wide. In addition this change: 1. The Environment path append helper is moved to `util.py` and a new `prepend` version is added. 2. `set_run_env` and `build_dev` functions are combined and include more code from callers so environment setup is more often in the same place. Now code that used to call `set_run_env` calls `build_dev` and then `os.environ.update(...)`. We can further refine this with the `is_build` argument later. 4. Python typing information is added in many places. <!-- 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 - [x] These changes fix #25335 - [x] These changes do not require tests because they are to the build scripts. <!-- 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. -->
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 18780b2ac01..f632ce30a1c 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -40,7 +40,6 @@ from servo.command_base import (
call, check_call, check_output,
)
from servo_tidy_tests import test_tidy
-from servo.platform import host_triple
SCRIPT_PATH = os.path.split(__file__)[0]
PROJECT_TOPLEVEL_PATH = os.path.abspath(os.path.join(SCRIPT_PATH, "..", ".."))
@@ -247,16 +246,6 @@ class MachCommands(CommandBase):
packages.discard('stylo')
- env = self.build_env(test_unit=True)
- # FIXME: https://github.com/servo/servo/issues/26192
- if "apple-darwin" not in host_triple():
- env["RUST_BACKTRACE"] = "1"
-
- if "msvc" in host_triple():
- # 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.
- env["PATH"] = "%s%s%s" % (path.dirname(self.get_binary_path(False, False)), os.pathsep, env["PATH"])
-
if len(packages) > 0 or len(in_crate_packages) > 0:
args = []
for crate in packages:
@@ -270,7 +259,7 @@ class MachCommands(CommandBase):
err = self.run_cargo_build_like_command("bench" if bench else "test",
args,
- env=env,
+ env=self.build_env(test_unit=True),
with_layout_2020=with_layout_2020,
**kwargs)
if err:
@@ -393,7 +382,8 @@ class MachCommands(CommandBase):
return self._test_wpt(android=True, **kwargs)
def _test_wpt(self, android=False, **kwargs):
- self.set_run_env(android)
+ if not android:
+ os.environ.update(self.build_env())
return wpt.run.run_tests(**kwargs)
# Helper to ensure all specified paths are handled, otherwise dispatch to appropriate test suite.