|
39 | 39 | "lib.tb_python_pkg.Test eval of real with underflow from C to VHDL", |
40 | 40 | ] |
41 | 41 |
|
| 42 | +# Fails during elaboration, with this error rather than a crash, see #17 |
| 43 | +ELABORATION_ARRAY_TEST = "lib.tb_elaboration_array.all" |
| 44 | +ELABORATION_ARRAY_ERROR = "An integer_array_t argument cannot be made before test_runner_setup" |
| 45 | + |
42 | 46 | # Simulators where python_pkg is implemented by the VUnit Python bridge |
43 | 47 | BRIDGE_SIMULATORS = ["nvc", "ghdl", "modelsim"] |
44 | 48 |
|
@@ -67,6 +71,11 @@ def verify(results, expected_failures): |
67 | 71 | if missing: |
68 | 72 | raise RuntimeError("Tests expected to fail but did not:\n" + "\n".join(missing)) |
69 | 73 |
|
| 74 | + if ELABORATION_ARRAY_TEST in expected and ELABORATION_ARRAY_ERROR not in ( |
| 75 | + tests[ELABORATION_ARRAY_TEST].path / "output.txt" |
| 76 | + ).read_text(encoding="utf-8"): |
| 77 | + raise RuntimeError(f"{ELABORATION_ARRAY_TEST} failed without the error: {ELABORATION_ARRAY_ERROR}") |
| 78 | + |
70 | 79 | if expected: |
71 | 80 | print(f"Verified {len(expected)} expected failures: {', '.join(name.split('.')[-1] for name in expected)}") |
72 | 81 |
|
@@ -113,6 +122,8 @@ def main(): |
113 | 122 | if simulator_name in BRIDGE_SIMULATORS: |
114 | 123 | # The operations implemented by the Python bridge |
115 | 124 | lib.add_source_file(ROOT / "tb_python_pkg_bridge.vhd") |
| 125 | + lib.add_source_file(ROOT / "tb_elaboration_array.vhd") |
| 126 | + expected_failures.append(ELABORATION_ARRAY_TEST) |
116 | 127 |
|
117 | 128 | vu.set_compile_option("rivierapro.vcom_flags", ["-dbg"]) |
118 | 129 | vu.set_sim_option("rivierapro.vsim_flags", ["-interceptcoutput"]) |
|
0 commit comments