Skip to content

Commit 2aea9f4

Browse files
committed
Tolerate upcoming change in base that makes log critical more severe
1 parent 402d958 commit 2aea9f4

File tree

4 files changed

+28
-21
lines changed

4 files changed

+28
-21
lines changed

test/1.2/statements/T_log.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
# SPDX-License-Identifier: MPL-2.0
33

44
conf.sim.fail_on_warnings = False
5-
obj.log_stuff = None
5+
try:
6+
obj.log_stuff = None
7+
except simics.CriticalErrors:
8+
pass

test/1.2/statements/T_log_new.dml

+15-13
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,20 @@
44
*/
55
dml 1.2;
66
device test;
7-
import "testing.dml";
87

9-
method test -> (bool ok) {
10-
/// GREP \[obj info\] INFO
11-
log info: "INFO";
12-
/// GREP \[obj spec-viol\] SPEC_VIOL_
13-
log spec_viol: "SPEC_VIOL_";
14-
/// GREP \[obj unimpl\] UNIMPL_
15-
log unimpl: "UNIMPL_";
16-
/// GREP \[obj error\] ERROR
17-
log error: "ERROR";
18-
/// GREP \[obj critical\] CRITICAL
19-
log critical: "CRITICAL";
20-
ok = true;
8+
attribute logstuff {
9+
parameter type = "n";
10+
parameter configuration = "pseudo";
11+
method set(attr_value_t _) {
12+
/// GREP \[obj info\] INFO
13+
log info: "INFO";
14+
/// GREP \[obj spec-viol\] SPEC_VIOL_
15+
log spec_viol: "SPEC_VIOL_";
16+
/// GREP \[obj unimpl\] UNIMPL_
17+
log unimpl: "UNIMPL_";
18+
/// GREP \[obj error\] ERROR
19+
log error: "ERROR";
20+
/// GREP \[obj critical\] CRITICAL
21+
log critical: "CRITICAL";
22+
}
2123
}

test/1.2/statements/T_log_new.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# SPDX-License-Identifier: MPL-2.0
33

44
conf.sim.fail_on_warnings = False
5-
if not obj.runtest:
6-
print('test attribute returned false')
7-
SIM_quit(1)
8-
9-
5+
try:
6+
obj.logstuff = None
7+
except simics.CriticalErrors:
8+
pass

test/1.4/lib/T_connect.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ class signal_stub(pyobj.ConfObject): pass
1414
# port object
1515
conf.sim.fail_on_warnings = False
1616
with stest.expect_log_mgr(None, 'critical'):
17-
bad = simics.SIM_create_object('test', 'bad', [])
18-
stest.expect_equal(bad.sub_renamed, [None, None])
17+
try:
18+
simics.SIM_create_object('test', 'bad', [])
19+
except simics.CriticalErrors:
20+
pass
21+
stest.expect_equal(conf.bad.sub_renamed, [None, None])
1922
conf.sim.fail_on_warnings = True
2023

2124
SIM_register_interface('signal_stub', 'signal', signal_interface_t(

0 commit comments

Comments
 (0)