Skip to content

Commit 76f83a1

Browse files
committed
Run test262 using only the bytecode VM
The AST interpreter has been removed.
1 parent 67aa231 commit 76f83a1

File tree

2 files changed

+3
-56
lines changed

2 files changed

+3
-56
lines changed

main.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class TestRun:
7575
def run_streaming_script(
7676
libjs_test262_runner: Path,
7777
test262_root: Path,
78-
use_bytecode: bool,
7978
extra_runner_options: list[str],
8079
timeout: int,
8180
memory_limit: int,
@@ -89,7 +88,6 @@ def limit_memory():
8988

9089
command = [
9190
str(libjs_test262_runner),
92-
*(["-b"] if use_bytecode else []),
9391
*extra_runner_options,
9492
"--harness-location",
9593
str((test262_root / "harness").resolve()),
@@ -113,7 +111,6 @@ def run_tests(
113111
libjs_test262_runner: Path,
114112
test262_root: Path,
115113
test_file_paths: list[Path],
116-
use_bytecode: bool,
117114
extra_runner_options: list[str],
118115
timeout: int,
119116
memory_limit: int,
@@ -147,7 +144,6 @@ def add_result(
147144
process_result: Any = run_streaming_script(
148145
libjs_test262_runner,
149146
test262_root,
150-
use_bytecode,
151147
extra_runner_options,
152148
timeout,
153149
memory_limit,
@@ -258,7 +254,6 @@ def __init__(
258254
memory_limit: int,
259255
silent: bool = False,
260256
verbose: bool = False,
261-
use_bytecode: bool = False,
262257
track_per_file: bool = False,
263258
fail_only: bool = False,
264259
extra_runner_options: list[str] | None = None,
@@ -272,7 +267,6 @@ def __init__(
272267
self.memory_limit = memory_limit
273268
self.silent = silent
274269
self.verbose = verbose
275-
self.use_bytecode = use_bytecode
276270
self.track_per_file = track_per_file
277271
self.fail_only = fail_only
278272
self.files: list[Path] = []
@@ -400,7 +394,6 @@ def process_list(self, files: list[Path]) -> list[TestRun]:
400394
self.libjs_test262_runner,
401395
self.test262_root,
402396
files,
403-
use_bytecode=self.use_bytecode,
404397
extra_runner_options=self.extra_runner_options,
405398
timeout=self.timeout,
406399
memory_limit=self.memory_limit,
@@ -513,12 +506,6 @@ def main() -> None:
513506
metavar="PATH",
514507
help="path to the 'test262-runner' binary",
515508
)
516-
parser.add_argument(
517-
"-b",
518-
"--use-bytecode",
519-
action="store_true",
520-
help="Use the bytecode interpreter to run the tests",
521-
)
522509
parser.add_argument(
523510
"-t",
524511
"--test262-root",
@@ -619,7 +606,6 @@ def main() -> None:
619606
args.memory_limit,
620607
args.silent,
621608
args.verbose,
622-
args.use_bytecode,
623609
args.per_file is not None,
624610
args.fail_only,
625611
extra_runner_options,

run_all_and_update_results.py

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,7 @@ def main() -> None:
7979
default=None,
8080
type=str,
8181
metavar="PATH",
82-
help="output the per-file result of the non-bytecode run to this file",
83-
)
84-
parser.add_argument(
85-
"--per-file-bytecode-output",
86-
default=None,
87-
type=str,
88-
metavar="PATH",
89-
help="output the per-file result of the bytecode run to this file",
82+
help="output the per-file result to this file",
9083
)
9184
args = parser.parse_args()
9285

@@ -143,7 +136,7 @@ def main() -> None:
143136
)
144137
test_js_results = test_js_output["results"]["tests"]
145138

146-
print("Running test262 with the AST interpreter...")
139+
print("Running test262...")
147140
libjs_test262_output = json.loads(
148141
# This is not the way, but I can't be bothered to import this stuff. :^)
149142
run_command(
@@ -160,23 +153,6 @@ def main() -> None:
160153
)
161154
libjs_test262_results = libjs_test262_output["results"]["test"]["results"]
162155

163-
print("Running test262 with the bytecode interpreter...")
164-
libjs_test262_bc_output = json.loads(
165-
# This is not the way either, but I can't be bothered to fix the one above and _then_ copy it. :^)
166-
run_command(
167-
f"python3 {libjs_test262_main_py} "
168-
f"--libjs-test262-runner {libjs_test262_runner} "
169-
f"--test262 {test262} "
170-
"--silent --summary --json --use-bytecode "
171-
+ (
172-
""
173-
if args.per_file_bytecode_output is None
174-
else f"--per-file {args.per_file_bytecode_output} "
175-
)
176-
)
177-
)
178-
libjs_test262_bc_results = libjs_test262_bc_output["results"]["test"]["results"]
179-
180156
result = {
181157
"commit_timestamp": commit_timestamp,
182158
"run_timestamp": run_timestamp,
@@ -187,7 +163,7 @@ def main() -> None:
187163
"test262-parser-tests": version_test262_parser_tests,
188164
},
189165
"tests": {
190-
"test262": {
166+
"test262-bytecode": {
191167
"duration": libjs_test262_output["duration"],
192168
"results": {
193169
"total": libjs_test262_output["results"]["test"]["count"],
@@ -202,21 +178,6 @@ def main() -> None:
202178
"todo_error": libjs_test262_results["TODO_ERROR"],
203179
},
204180
},
205-
"test262-bytecode": {
206-
"duration": libjs_test262_bc_output["duration"],
207-
"results": {
208-
"total": libjs_test262_bc_output["results"]["test"]["count"],
209-
"passed": libjs_test262_bc_results["PASSED"],
210-
"failed": libjs_test262_bc_results["FAILED"],
211-
"skipped": libjs_test262_bc_results["SKIPPED"],
212-
"metadata_error": libjs_test262_bc_results["METADATA_ERROR"],
213-
"harness_error": libjs_test262_bc_results["HARNESS_ERROR"],
214-
"timeout_error": libjs_test262_bc_results["TIMEOUT_ERROR"],
215-
"process_error": libjs_test262_bc_results["PROCESS_ERROR"],
216-
"runner_exception": libjs_test262_bc_results["RUNNER_EXCEPTION"],
217-
"todo_error": libjs_test262_bc_results["TODO_ERROR"],
218-
},
219-
},
220181
"test262-parser-tests": {
221182
"duration": test_js_output["duration"],
222183
"results": {

0 commit comments

Comments
 (0)