Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions test/.self-test/test_harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,6 @@ def test_exit_only_exact_code_auto_discover(harness, run):
assert "PASS exit5" in out


def test_exit_only_stages_list_skips(harness, run):
"""Exit-only test: explicit stages list + exit=0, no golden -> SKIP."""
harness.add_test("skipme", src="// exit: 0\n",
meta={"stages": ["lexer"], "exit": 0})
cfg = harness.write_config(stages=lexer_stage(["kind"]))
rc, out = run(["test", "--config", cfg])
assert rc == 0
assert "SKIP skipme" in out


def test_crash_fails(harness, run):
add_lexer(harness, "crash", src="// crash\n", meta={"exit": 0})
cfg = harness.write_config(stages=lexer_stage(["kind"]))
Expand Down
6 changes: 3 additions & 3 deletions test/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def discover_tests(test_root, grammar, stage_filter, name_filter, skip_dir=None,
spec = False
for stage in STAGE_GOLDEN_DEFAULT:
s = exit_spec(meta, stage=stage)
if s == "nonzero" or (isinstance(s, int) and s != 0):
if s == "nonzero" or isinstance(s, int):
spec = s
break
if spec:
Expand Down Expand Up @@ -728,7 +728,7 @@ def no_golden_result(result, meta, is_fuzz, stage=None):
if is_fuzz:
return result # fuzz exit contract met; nothing to compare
spec = exit_spec(meta, stage=stage)
if spec == "nonzero" or (isinstance(spec, int) and spec != 0):
if spec == "nonzero" or isinstance(spec, int):
return result # exit-only negative test
result.status = "SKIP"
result.lines.append("no golden file; nothing to compare")
Expand Down Expand Up @@ -1123,7 +1123,7 @@ def Y(s):
if not found_stages:
for stage in STAGE_GOLDEN_DEFAULT:
s = exit_spec(meta, stage=stage)
if s == "nonzero" or (isinstance(s, int) and s != 0):
if s == "nonzero" or isinstance(s, int):
found_stages.add(stage)
break
if not found_stages:
Expand Down
Loading