@@ -41,33 +41,16 @@ def test_artificial_elaborate_only(self):
4141 self .check (self .artificial_run ,
4242 exit_code = 1 ,
4343 args = ["--elaborate" ])
44- check_report (self .report_file , [
45- ("passed" , "lib.tb_pass" ),
46- ("passed" , "lib.tb_fail" ),
47- ("passed" , "lib.tb_infinite_events" ),
48- ("passed" , "lib.tb_fail_on_warning" ),
49- ("passed" , "lib.tb_no_fail_on_warning" ),
50- ("passed" , "lib.tb_two_architectures.pass" ),
51- ("passed" , "lib.tb_two_architectures.fail" ),
52- ("passed" , "lib.tb_with_vhdl_runner.pass" ),
53- ("passed" , "lib.tb_with_vhdl_runner.Test with spaces" ),
54- ("passed" , "lib.tb_with_vhdl_runner.fail" ),
55- ("passed" , "lib.tb_with_vhdl_runner.Test that timeouts" ),
56- ("passed" , "lib.tb_magic_paths" ),
57- ("passed" , "lib.tb_no_fail_after_cleanup" ),
58- ("failed" , "lib.tb_elab_fail" ),
59-
60- ("passed" , "lib.tb_same_sim_all_pass.Test 1" ),
61- ("passed" , "lib.tb_same_sim_all_pass.Test 2" ),
62- ("passed" , "lib.tb_same_sim_all_pass.Test 3" ),
63-
64- ("passed" , "lib.tb_same_sim_some_fail.Test 1" ),
65- ("passed" , "lib.tb_same_sim_some_fail.Test 2" ),
66- ("passed" , "lib.tb_same_sim_some_fail.Test 3" ),
67-
68- ("passed" , "lib.tb_with_checks.Test passing check" ),
69- ("passed" , "lib.tb_with_checks.Test failing check" ),
70- ("passed" , "lib.tb_with_checks.Test non-stopping failing check" )])
44+
45+ elab_expected_report = []
46+ for status , name in EXPECTED_REPORT :
47+ if name in ("lib.tb_elab_fail" ,):
48+ status = "failed"
49+ else :
50+ status = "passed"
51+ elab_expected_report .append ((status , name ))
52+
53+ check_report (self .report_file , elab_expected_report )
7154
7255 self .check (self .artificial_run ,
7356 exit_code = 0 ,
@@ -91,34 +74,7 @@ def _test_artificial(self, args=None):
9174 self .check (self .artificial_run ,
9275 exit_code = 1 ,
9376 args = args )
94- check_report (self .report_file , [
95- ("passed" , "lib.tb_pass" ),
96- ("failed" , "lib.tb_fail" ),
97- ("passed" , "lib.tb_infinite_events" ),
98- ("failed" , "lib.tb_fail_on_warning" ),
99- ("passed" , "lib.tb_no_fail_on_warning" ),
100- ("passed" , "lib.tb_two_architectures.pass" ),
101- ("failed" , "lib.tb_two_architectures.fail" ),
102- ("passed" , "lib.tb_with_vhdl_runner.pass" ),
103- ("passed" , "lib.tb_with_vhdl_runner.Test with spaces" ),
104- ("failed" , "lib.tb_with_vhdl_runner.fail" ),
105- ("failed" , "lib.tb_with_vhdl_runner.Test that timeouts" ),
106- ("passed" , "lib.tb_magic_paths" ),
107- ("passed" , "lib.tb_no_fail_after_cleanup" ),
108- ("failed" , "lib.tb_elab_fail" ),
109-
110- # @TODO verify that these are actually run in separate simulations
111- ("passed" , "lib.tb_same_sim_all_pass.Test 1" ),
112- ("passed" , "lib.tb_same_sim_all_pass.Test 2" ),
113- ("passed" , "lib.tb_same_sim_all_pass.Test 3" ),
114-
115- ("passed" , "lib.tb_same_sim_some_fail.Test 1" ),
116- ("failed" , "lib.tb_same_sim_some_fail.Test 2" ),
117- ("skipped" , "lib.tb_same_sim_some_fail.Test 3" ),
118-
119- ("passed" , "lib.tb_with_checks.Test passing check" ),
120- ("failed" , "lib.tb_with_checks.Test failing check" ),
121- ("failed" , "lib.tb_with_checks.Test non-stopping failing check" )])
77+ check_report (self .report_file , EXPECTED_REPORT )
12278
12379 def test_run_selected_tests_in_same_sim_test_bench (self ):
12480 self .check (self .artificial_run ,
@@ -181,3 +137,39 @@ def check(self, run_file, args=None, persistent_sim=True, clean=True, exit_code=
181137 "--xunit-xml=%s" % self .report_file ] + args ,
182138 env = new_env )
183139 self .assertEqual (retcode , exit_code )
140+
141+
142+ EXPECTED_REPORT = (
143+ ("passed" , "lib.tb_pass" ),
144+ ("failed" , "lib.tb_fail" ),
145+ ("passed" , "lib.tb_infinite_events" ),
146+ ("failed" , "lib.tb_fail_on_warning" ),
147+ ("passed" , "lib.tb_no_fail_on_warning" ),
148+ ("passed" , "lib.tb_two_architectures.pass" ),
149+ ("failed" , "lib.tb_two_architectures.fail" ),
150+ ("passed" , "lib.tb_with_vhdl_runner.pass" ),
151+ ("passed" , "lib.tb_with_vhdl_runner.Test with spaces" ),
152+ ("failed" , "lib.tb_with_vhdl_runner.fail" ),
153+ ("failed" , "lib.tb_with_vhdl_runner.Test that timeouts" ),
154+ ("passed" , "lib.tb_magic_paths" ),
155+ ("passed" , "lib.tb_no_fail_after_cleanup" ),
156+ ("failed" , "lib.tb_elab_fail" ),
157+
158+ # @TODO verify that these are actually run in separate simulations
159+ ("passed" , "lib.tb_same_sim_all_pass.Test 1" ),
160+ ("passed" , "lib.tb_same_sim_all_pass.Test 2" ),
161+ ("passed" , "lib.tb_same_sim_all_pass.Test 3" ),
162+
163+ ("passed" , "lib.tb_same_sim_some_fail.Test 1" ),
164+ ("failed" , "lib.tb_same_sim_some_fail.Test 2" ),
165+ ("skipped" , "lib.tb_same_sim_some_fail.Test 3" ),
166+
167+ ("passed" , "lib.tb_with_checks.Test passing check" ),
168+ ("failed" , "lib.tb_with_checks.Test failing check" ),
169+ ("failed" , "lib.tb_with_checks.Test non-stopping failing check" ),
170+
171+ ("passed" , "lib.tb_with_generic_config.Test 0" ),
172+ ("passed" , "lib.tb_with_generic_config.Test 1" ),
173+ ("passed" , "lib.tb_with_generic_config.Test 2" ),
174+ ("passed" , "lib.tb_with_generic_config.Test 3" ),
175+ ("passed" , "lib.tb_with_generic_config.Test 4" ))
0 commit comments