From 6f70a9c1de649ce38e014eaa8fa3b22f862768a9 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 2 Jan 2020 14:48:13 +0100 Subject: mach: always call `ensure_bootstrapped` before `call_rustup_run` --- python/servo/testing_commands.py | 1 + 1 file changed, 1 insertion(+) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index 0c107a1867b..c874d5ed26e 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -310,6 +310,7 @@ class MachCommands(CommandBase): return 0 def install_rustfmt(self): + self.ensure_bootstrapped() with open(os.devnull, "w") as devnull: if self.call_rustup_run(["cargo", "fmt", "--version", "-q"], stderr=devnull) != 0: -- cgit v1.2.3 From 895cf695c440d7369255e92c9a0771b3bb0a0988 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 2 Jan 2020 16:44:17 +0100 Subject: Fix a Python 3 warning ``` /home/simon/projects/servo/python/servo/testing_commands.py:301: SyntaxWarning: "is not" with a literal. Did you mean "!="? if err is not 0: ``` --- python/servo/testing_commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index c874d5ed26e..dad2af0aa04 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -298,7 +298,7 @@ class MachCommands(CommandBase): args += ["--", "--nocapture"] err = self.run_cargo_build_like_command("bench" if bench else "test", args, env=env, **kwargs) - if err is not 0: + if err: return err @Command('test-content', -- cgit v1.2.3 From 8fc072a375378dcc73d2e348d8e46a4d735e6210 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 2 Jan 2020 19:25:01 +0100 Subject: =?UTF-8?q?Don=E2=80=99t=20run=20`ensure=5Fbootstrapped`=20when=20?= =?UTF-8?q?rustup=20is=20not=20used=20at=20all.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Linux WPT tasks on our CI don’t have rustup installed. --- python/servo/testing_commands.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'python/servo/testing_commands.py') diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py index dad2af0aa04..bc29955fd79 100644 --- a/python/servo/testing_commands.py +++ b/python/servo/testing_commands.py @@ -199,7 +199,6 @@ class MachCommands(CommandBase): def test_perf(self, base=None, date=None, submit=False): self.set_software_rendering_env(True, False) - self.ensure_bootstrapped() env = self.build_env() cmd = ["bash", "test_perf.sh"] if base: @@ -370,8 +369,6 @@ class MachCommands(CommandBase): @CommandArgument('tests', default=None, nargs="...", help="Specific tests to run, relative to the tests directory") def test_webidl(self, quiet, tests): - self.ensure_bootstrapped() - test_file_dir = path.abspath(path.join(PROJECT_TOPLEVEL_PATH, "components", "script", "dom", "bindings", "codegen", "parser")) # For the `import WebIDL` in runtests.py @@ -389,7 +386,6 @@ class MachCommands(CommandBase): category='testing', parser=create_parser_wpt) def test_wpt_failure(self, **kwargs): - self.ensure_bootstrapped() kwargs["pause_after_test"] = False kwargs["include"] = ["infrastructure/failing-test.html"] return not self._test_wpt(**kwargs) @@ -399,7 +395,6 @@ class MachCommands(CommandBase): category='testing', parser=create_parser_wpt) def test_wpt(self, **kwargs): - self.ensure_bootstrapped() ret = self.run_test_list_or_dispatch(kwargs["test_list"], "wpt", self._test_wpt, **kwargs) if kwargs["always_succeed"]: return 0 @@ -499,7 +494,6 @@ class MachCommands(CommandBase): category='testing', parser=updatecommandline.create_parser()) def update_wpt(self, **kwargs): - self.ensure_bootstrapped() run_file = path.abspath(path.join("tests", "wpt", "update.py")) patch = kwargs.get("patch", False) @@ -717,7 +711,6 @@ class MachCommands(CommandBase): str(c1).ljust(width_col3), str(d1).ljust(width_col4))) def jquery_test_runner(self, cmd, release, dev): - self.ensure_bootstrapped() base_dir = path.abspath(path.join("tests", "jquery")) jquery_dir = path.join(base_dir, "jquery") run_file = path.join(base_dir, "run_jquery.py") @@ -737,7 +730,6 @@ class MachCommands(CommandBase): return call([run_file, cmd, bin_path, base_dir]) def dromaeo_test_runner(self, tests, release, dev): - self.ensure_bootstrapped() base_dir = path.abspath(path.join("tests", "dromaeo")) dromaeo_dir = path.join(base_dir, "dromaeo") run_file = path.join(base_dir, "run_dromaeo.py") @@ -970,8 +962,6 @@ testing/web-platform/mozilla/tests for Servo-only tests""" % reference_path) @CommandArgument('--version', default='2.0.0', help='WebGL conformance suite version') def update_webgl(self, version=None): - self.ensure_bootstrapped() - base_dir = path.abspath(path.join(PROJECT_TOPLEVEL_PATH, "tests", "wpt", "mozilla", "tests", "webgl")) run_file = path.join(base_dir, "tools", "import-conformance-tests.py") -- cgit v1.2.3