From b13a1a244436e6a3c6a7b218bd29b23724dfa6b9 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 19 Feb 2024 15:31:13 -0500 Subject: [PATCH] Remove JIT from test262 runner --- main.py | 19 +++-------------- run_all_and_update_results.py | 39 ----------------------------------- 2 files changed, 3 insertions(+), 55 deletions(-) diff --git a/main.py b/main.py index 283cec5..4ad7566 100755 --- a/main.py +++ b/main.py @@ -79,7 +79,6 @@ def run_streaming_script( timeout: int, memory_limit: int, test_file_paths: list[Path], - jit: bool, ) -> subprocess.CompletedProcess: def limit_memory(): if platform.system() != "Darwin": @@ -105,7 +104,6 @@ def limit_memory(): text=True, preexec_fn=limit_memory, errors="ignore", # strip invalid utf8 code points instead of throwing (to allow for invalid utf-8 tests) - env=({"LIBJS_JIT": "1"} if jit else dict()), ) @@ -118,7 +116,6 @@ def run_tests( memory_limit: int, on_progress_change: Callable[[int, dict[str, int]], None] | None, forward_stderr: Callable[[str], None] | None, - jit: bool, ) -> list[TestRun]: current_test = 0 results = [] @@ -151,7 +148,6 @@ def add_result( timeout, memory_limit, test_file_paths[current_test : current_test + BATCH_SIZE], - jit, ) except subprocess.CalledProcessError as e: process_failed = True @@ -263,7 +259,6 @@ def __init__( extra_runner_options: list[str] | None = None, forward_stderr: bool = False, summary: bool = False, - jit: bool = False, ) -> None: self.libjs_test262_runner = libjs_test262_runner self.test262_root = test262_root @@ -282,7 +277,6 @@ def __init__( self.extra_runner_options = extra_runner_options or [] self.update_function: Callable[[int], None] | None = None self.print_output: Callable[[Optional[Any]], Any] = print - self.jit = jit self.forward_stderr_function: Callable[[str], None] | None if forward_stderr: @@ -405,15 +399,14 @@ def process_list(self, files: list[Path]) -> list[TestRun]: memory_limit=self.memory_limit, on_progress_change=self.update_function, forward_stderr=self.forward_stderr_function, - jit=self.jit, ) except Exception as e: return [ TestRun( file, - result=TestResult.RUNNER_EXCEPTION - if i == 0 - else TestResult.SKIPPED, + result=( + TestResult.RUNNER_EXCEPTION if i == 0 else TestResult.SKIPPED + ), output=traceback.format_exc() if i == 0 else "", exit_code=None, strict_mode=None, @@ -506,11 +499,6 @@ def main() -> None: description="Run the test262 ECMAScript test suite with SerenityOS's LibJS", epilog=", ".join(f"{EMOJIS[result]} = {result.value}" for result in TestResult), ) - parser.add_argument( - "--jit", - action="store_true", - help="Enable JIT compilation mode", - ) parser.add_argument( "-j", "--libjs-test262-runner", @@ -623,7 +611,6 @@ def main() -> None: extra_runner_options, args.forward_stderr, args.summary, - args.jit, ) runner.find_tests(args.pattern, args.ignore) runner.run() diff --git a/run_all_and_update_results.py b/run_all_and_update_results.py index c2011c1..df05f87 100755 --- a/run_all_and_update_results.py +++ b/run_all_and_update_results.py @@ -89,13 +89,6 @@ def main() -> None: metavar="PATH", help="output the per-file result to this file", ) - parser.add_argument( - "--per-file-jit-output", - default=None, - type=str, - metavar="PATH", - help="output the per-file JIT result to this file", - ) args = parser.parse_args() libjs_test262 = Path(__file__).parent @@ -168,23 +161,6 @@ def main() -> None: ) libjs_test262_results = libjs_test262_output["results"]["test"]["results"] - print("Running test262 with JIT compiler...") - libjs_test262_jit_output = json.loads( - # This is not the way, but I can't be bothered to import this stuff. :^) - run_command( - f"python3 {libjs_test262_main_py} " - f"--libjs-test262-runner {libjs_test262_runner} " - f"--test262 {test262} " - "--silent --summary --json --jit " - + ( - "" - if args.per_file_jit_output is None - else f"--per-file {args.per_file_jit_output} " - ) - ) - ) - libjs_test262_jit_results = libjs_test262_jit_output["results"]["test"]["results"] - result = { "commit_timestamp": commit_timestamp, "run_timestamp": run_timestamp, @@ -210,21 +186,6 @@ def main() -> None: "todo_error": libjs_test262_results["TODO_ERROR"], }, }, - "test262-jit": { - "duration": libjs_test262_jit_output["duration"], - "results": { - "total": libjs_test262_jit_output["results"]["test"]["count"], - "passed": libjs_test262_jit_results["PASSED"], - "failed": libjs_test262_jit_results["FAILED"], - "skipped": libjs_test262_jit_results["SKIPPED"], - "metadata_error": libjs_test262_jit_results["METADATA_ERROR"], - "harness_error": libjs_test262_jit_results["HARNESS_ERROR"], - "timeout_error": libjs_test262_jit_results["TIMEOUT_ERROR"], - "process_error": libjs_test262_jit_results["PROCESS_ERROR"], - "runner_exception": libjs_test262_jit_results["RUNNER_EXCEPTION"], - "todo_error": libjs_test262_jit_results["TODO_ERROR"], - }, - }, "test262-parser-tests": { "duration": test_js_output["duration"], "results": {