@@ -90,9 +90,11 @@ def main() -> None:
9090 help = "output the per-file result to this file" ,
9191 )
9292 parser .add_argument (
93- "--jit" ,
94- action = "store_true" ,
95- help = "Enable JIT compilation mode" ,
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" ,
9698 )
9799 args = parser .parse_args ()
98100
@@ -157,7 +159,6 @@ def main() -> None:
157159 f"--libjs-test262-runner { libjs_test262_runner } "
158160 f"--test262 { test262 } "
159161 "--silent --summary --json "
160- + ("--jit " if args .jit else "" )
161162 + (
162163 ""
163164 if args .per_file_output is None
@@ -167,6 +168,23 @@ def main() -> None:
167168 )
168169 libjs_test262_results = libjs_test262_output ["results" ]["test" ]["results" ]
169170
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+
170188 result = {
171189 "commit_timestamp" : commit_timestamp ,
172190 "run_timestamp" : run_timestamp ,
@@ -192,6 +210,21 @@ def main() -> None:
192210 "todo_error" : libjs_test262_results ["TODO_ERROR" ],
193211 },
194212 },
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+ },
195228 "test262-parser-tests" : {
196229 "duration" : test_js_output ["duration" ],
197230 "results" : {
0 commit comments