Skip to content

Commit ed5c11c

Browse files
trflynn89awesomekling
authored andcommitted
Remove JIT from test262 runner
1 parent c36db8f commit ed5c11c

File tree

2 files changed

+3
-55
lines changed

2 files changed

+3
-55
lines changed

main.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def run_streaming_script(
7979
timeout: int,
8080
memory_limit: int,
8181
test_file_paths: list[Path],
82-
jit: bool,
8382
) -> subprocess.CompletedProcess:
8483
def limit_memory():
8584
if platform.system() != "Darwin":
@@ -105,7 +104,6 @@ def limit_memory():
105104
text=True,
106105
preexec_fn=limit_memory,
107106
errors="ignore", # strip invalid utf8 code points instead of throwing (to allow for invalid utf-8 tests)
108-
env=({"LIBJS_JIT": "1"} if jit else dict()),
109107
)
110108

111109

@@ -118,7 +116,6 @@ def run_tests(
118116
memory_limit: int,
119117
on_progress_change: Callable[[int, dict[str, int]], None] | None,
120118
forward_stderr: Callable[[str], None] | None,
121-
jit: bool,
122119
) -> list[TestRun]:
123120
current_test = 0
124121
results = []
@@ -151,7 +148,6 @@ def add_result(
151148
timeout,
152149
memory_limit,
153150
test_file_paths[current_test : current_test + BATCH_SIZE],
154-
jit,
155151
)
156152
except subprocess.CalledProcessError as e:
157153
process_failed = True
@@ -263,7 +259,6 @@ def __init__(
263259
extra_runner_options: list[str] | None = None,
264260
forward_stderr: bool = False,
265261
summary: bool = False,
266-
jit: bool = False,
267262
) -> None:
268263
self.libjs_test262_runner = libjs_test262_runner
269264
self.test262_root = test262_root
@@ -282,7 +277,6 @@ def __init__(
282277
self.extra_runner_options = extra_runner_options or []
283278
self.update_function: Callable[[int], None] | None = None
284279
self.print_output: Callable[[Optional[Any]], Any] = print
285-
self.jit = jit
286280

287281
self.forward_stderr_function: Callable[[str], None] | None
288282
if forward_stderr:
@@ -405,15 +399,14 @@ def process_list(self, files: list[Path]) -> list[TestRun]:
405399
memory_limit=self.memory_limit,
406400
on_progress_change=self.update_function,
407401
forward_stderr=self.forward_stderr_function,
408-
jit=self.jit,
409402
)
410403
except Exception as e:
411404
return [
412405
TestRun(
413406
file,
414-
result=TestResult.RUNNER_EXCEPTION
415-
if i == 0
416-
else TestResult.SKIPPED,
407+
result=(
408+
TestResult.RUNNER_EXCEPTION if i == 0 else TestResult.SKIPPED
409+
),
417410
output=traceback.format_exc() if i == 0 else "",
418411
exit_code=None,
419412
strict_mode=None,
@@ -506,11 +499,6 @@ def main() -> None:
506499
description="Run the test262 ECMAScript test suite with SerenityOS's LibJS",
507500
epilog=", ".join(f"{EMOJIS[result]} = {result.value}" for result in TestResult),
508501
)
509-
parser.add_argument(
510-
"--jit",
511-
action="store_true",
512-
help="Enable JIT compilation mode",
513-
)
514502
parser.add_argument(
515503
"-j",
516504
"--libjs-test262-runner",
@@ -623,7 +611,6 @@ def main() -> None:
623611
extra_runner_options,
624612
args.forward_stderr,
625613
args.summary,
626-
args.jit,
627614
)
628615
runner.find_tests(args.pattern, args.ignore)
629616
runner.run()

run_all_and_update_results.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,6 @@ def main() -> None:
8989
metavar="PATH",
9090
help="output the per-file result to this file",
9191
)
92-
parser.add_argument(
93-
"--per-file-jit-output",
94-
default=None,
95-
type=str,
96-
metavar="PATH",
97-
help="output the per-file JIT result to this file",
98-
)
9992
args = parser.parse_args()
10093

10194
libjs_test262 = Path(__file__).parent
@@ -168,23 +161,6 @@ def main() -> None:
168161
)
169162
libjs_test262_results = libjs_test262_output["results"]["test"]["results"]
170163

171-
print("Running test262 with JIT compiler...")
172-
libjs_test262_jit_output = json.loads(
173-
# This is not the way, but I can't be bothered to import this stuff. :^)
174-
run_command(
175-
f"python3 {libjs_test262_main_py} "
176-
f"--libjs-test262-runner {libjs_test262_runner} "
177-
f"--test262 {test262} "
178-
"--silent --summary --json --jit "
179-
+ (
180-
""
181-
if args.per_file_jit_output is None
182-
else f"--per-file {args.per_file_jit_output} "
183-
)
184-
)
185-
)
186-
libjs_test262_jit_results = libjs_test262_jit_output["results"]["test"]["results"]
187-
188164
result = {
189165
"commit_timestamp": commit_timestamp,
190166
"run_timestamp": run_timestamp,
@@ -210,21 +186,6 @@ def main() -> None:
210186
"todo_error": libjs_test262_results["TODO_ERROR"],
211187
},
212188
},
213-
"test262-jit": {
214-
"duration": libjs_test262_jit_output["duration"],
215-
"results": {
216-
"total": libjs_test262_jit_output["results"]["test"]["count"],
217-
"passed": libjs_test262_jit_results["PASSED"],
218-
"failed": libjs_test262_jit_results["FAILED"],
219-
"skipped": libjs_test262_jit_results["SKIPPED"],
220-
"metadata_error": libjs_test262_jit_results["METADATA_ERROR"],
221-
"harness_error": libjs_test262_jit_results["HARNESS_ERROR"],
222-
"timeout_error": libjs_test262_jit_results["TIMEOUT_ERROR"],
223-
"process_error": libjs_test262_jit_results["PROCESS_ERROR"],
224-
"runner_exception": libjs_test262_jit_results["RUNNER_EXCEPTION"],
225-
"todo_error": libjs_test262_jit_results["TODO_ERROR"],
226-
},
227-
},
228189
"test262-parser-tests": {
229190
"duration": test_js_output["duration"],
230191
"results": {

0 commit comments

Comments
 (0)