Add suite v2 failure coverage
- SHA
07b5cee3bb6dab3a9331df76134773bc88d4db30- Parents
-
ddf0168 - Tree
356a05c
07b5cee
07b5cee3bb6dab3a9331df76134773bc88d4db30ddf0168
356a05c| Status | File | + | - |
|---|---|---|---|
| M |
fixtures/README.md
|
2 | 0 |
| A |
fixtures/invalid/fake_compile_fail_expected.f90
|
5 | 0 |
| A |
suites/v2/generic_failures.afs
|
23 | 0 |
fixtures/README.mdmodified@@ -40,6 +40,8 @@ toolchains happen to be installed on a machine. | ||
| 40 | 40 | Sprint 11 adds `fixtures/invalid/` for bench-owned bad-source probes. Those |
| 41 | 41 | fixtures let `bencch introspect` exercise compiler failure reporting and |
| 42 | 42 | partial capture without depending on temp-file setup inside tests. |
| 43 | +That same area now also holds a tiny source-comment-driven failure probe for | |
| 44 | +suite-v2 generic failure coverage. | |
| 43 | 45 | |
| 44 | 46 | The mem2reg merge-smoothing work adds `fixtures/compat/mem2reg/` for imported |
| 45 | 47 | branch-owned audit programs. Those files keep their inline `! IR_CHECK:`, |
fixtures/invalid/fake_compile_fail_expected.f90added@@ -0,0 +1,5 @@ | ||
| 1 | +! ERROR_EXPECTED: fake compiler failure | |
| 2 | +program fake_compile_fail_expected | |
| 3 | + implicit none | |
| 4 | + print *, 42 | |
| 5 | +end program fake_compile_fail_expected | |
suites/v2/generic_failures.afsadded@@ -0,0 +1,23 @@ | ||
| 1 | +suite "v2/generic-failures" | |
| 2 | + | |
| 3 | +case "fake_compiler_expected_diagnostic" | |
| 4 | +source "../../fixtures/invalid/fake_compile_fail_expected.f90" | |
| 5 | +compiler "../../fixtures/fake_compilers/compile_fail.sh" => diagnostics | |
| 6 | +expect-fail comments | |
| 7 | +end | |
| 8 | + | |
| 9 | +case "armfortas_parse_error" | |
| 10 | +source "../../fixtures/invalid/parse_error.f90" | |
| 11 | +compiler armfortas => diagnostics | |
| 12 | +expect-fail parser contains "expected entity name" | |
| 13 | +end | |
| 14 | + | |
| 15 | +case "fake_compilers_compile_divergence" | |
| 16 | +source "../../fixtures/runtime/if_else.f90" | |
| 17 | +compare "../../fixtures/fake_compilers/compile_fail.sh" "../../fixtures/fake_compilers/match_42_a.sh" => diagnostics | |
| 18 | +expect compare.status equals "diff" | |
| 19 | +expect compare.classification equals "compile divergence" | |
| 20 | +expect compare.changed_artifacts contains "compile-exit-code" | |
| 21 | +expect compare.changed_artifacts contains "diagnostics" | |
| 22 | +expect compare.difference_count equals 2 | |
| 23 | +end | |