From c3861b266cae138b5b878d073548065f552e0866 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 8 Aug 2023 07:22:37 -0400 Subject: [PATCH] Run test262 using only the bytecode VM The AST interpreter has been removed. --- main.py | 14 ----------- run_all_and_update_results.py | 45 +++-------------------------------- 2 files changed, 3 insertions(+), 56 deletions(-) diff --git a/main.py b/main.py index e69b88b..d173e8c 100755 --- a/main.py +++ b/main.py @@ -75,7 +75,6 @@ class TestRun: def run_streaming_script( libjs_test262_runner: Path, test262_root: Path, - use_bytecode: bool, extra_runner_options: list[str], timeout: int, memory_limit: int, @@ -89,7 +88,6 @@ def limit_memory(): command = [ str(libjs_test262_runner), - *(["-b"] if use_bytecode else []), *extra_runner_options, "--harness-location", str((test262_root / "harness").resolve()), @@ -113,7 +111,6 @@ def run_tests( libjs_test262_runner: Path, test262_root: Path, test_file_paths: list[Path], - use_bytecode: bool, extra_runner_options: list[str], timeout: int, memory_limit: int, @@ -147,7 +144,6 @@ def add_result( process_result: Any = run_streaming_script( libjs_test262_runner, test262_root, - use_bytecode, extra_runner_options, timeout, memory_limit, @@ -258,7 +254,6 @@ def __init__( memory_limit: int, silent: bool = False, verbose: bool = False, - use_bytecode: bool = False, track_per_file: bool = False, fail_only: bool = False, extra_runner_options: list[str] | None = None, @@ -272,7 +267,6 @@ def __init__( self.memory_limit = memory_limit self.silent = silent self.verbose = verbose - self.use_bytecode = use_bytecode self.track_per_file = track_per_file self.fail_only = fail_only self.files: list[Path] = [] @@ -400,7 +394,6 @@ def process_list(self, files: list[Path]) -> list[TestRun]: self.libjs_test262_runner, self.test262_root, files, - use_bytecode=self.use_bytecode, extra_runner_options=self.extra_runner_options, timeout=self.timeout, memory_limit=self.memory_limit, @@ -513,12 +506,6 @@ def main() -> None: metavar="PATH", help="path to the 'test262-runner' binary", ) - parser.add_argument( - "-b", - "--use-bytecode", - action="store_true", - help="Use the bytecode interpreter to run the tests", - ) parser.add_argument( "-t", "--test262-root", @@ -619,7 +606,6 @@ def main() -> None: args.memory_limit, args.silent, args.verbose, - args.use_bytecode, args.per_file is not None, args.fail_only, extra_runner_options, diff --git a/run_all_and_update_results.py b/run_all_and_update_results.py index 79da6a5..aa437b4 100755 --- a/run_all_and_update_results.py +++ b/run_all_and_update_results.py @@ -79,14 +79,7 @@ def main() -> None: default=None, type=str, metavar="PATH", - help="output the per-file result of the non-bytecode run to this file", - ) - parser.add_argument( - "--per-file-bytecode-output", - default=None, - type=str, - metavar="PATH", - help="output the per-file result of the bytecode run to this file", + help="output the per-file result to this file", ) args = parser.parse_args() @@ -143,7 +136,7 @@ def main() -> None: ) test_js_results = test_js_output["results"]["tests"] - print("Running test262 with the AST interpreter...") + print("Running test262...") libjs_test262_output = json.loads( # This is not the way, but I can't be bothered to import this stuff. :^) run_command( @@ -160,23 +153,6 @@ def main() -> None: ) libjs_test262_results = libjs_test262_output["results"]["test"]["results"] - print("Running test262 with the bytecode interpreter...") - libjs_test262_bc_output = json.loads( - # This is not the way either, but I can't be bothered to fix the one above and _then_ copy it. :^) - run_command( - f"python3 {libjs_test262_main_py} " - f"--libjs-test262-runner {libjs_test262_runner} " - f"--test262 {test262} " - "--silent --summary --json --use-bytecode " - + ( - "" - if args.per_file_bytecode_output is None - else f"--per-file {args.per_file_bytecode_output} " - ) - ) - ) - libjs_test262_bc_results = libjs_test262_bc_output["results"]["test"]["results"] - result = { "commit_timestamp": commit_timestamp, "run_timestamp": run_timestamp, @@ -187,7 +163,7 @@ def main() -> None: "test262-parser-tests": version_test262_parser_tests, }, "tests": { - "test262": { + "test262-bytecode": { "duration": libjs_test262_output["duration"], "results": { "total": libjs_test262_output["results"]["test"]["count"], @@ -202,21 +178,6 @@ def main() -> None: "todo_error": libjs_test262_results["TODO_ERROR"], }, }, - "test262-bytecode": { - "duration": libjs_test262_bc_output["duration"], - "results": { - "total": libjs_test262_bc_output["results"]["test"]["count"], - "passed": libjs_test262_bc_results["PASSED"], - "failed": libjs_test262_bc_results["FAILED"], - "skipped": libjs_test262_bc_results["SKIPPED"], - "metadata_error": libjs_test262_bc_results["METADATA_ERROR"], - "harness_error": libjs_test262_bc_results["HARNESS_ERROR"], - "timeout_error": libjs_test262_bc_results["TIMEOUT_ERROR"], - "process_error": libjs_test262_bc_results["PROCESS_ERROR"], - "runner_exception": libjs_test262_bc_results["RUNNER_EXCEPTION"], - "todo_error": libjs_test262_bc_results["TODO_ERROR"], - }, - }, "test262-parser-tests": { "duration": test_js_output["duration"], "results": {