File tree 4 files changed +28
-21
lines changed
4 files changed +28
-21
lines changed Original file line number Diff line number Diff line change 2
2
# SPDX-License-Identifier: MPL-2.0
3
3
4
4
conf .sim .fail_on_warnings = False
5
- obj .log_stuff = None
5
+ try :
6
+ obj .log_stuff = None
7
+ except simics .CriticalErrors :
8
+ pass
Original file line number Diff line number Diff line change 4
4
*/
5
5
dml 1.2;
6
6
device test;
7
- import "testing.dml";
8
7
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
+ }
21
23
}
Original file line number Diff line number Diff line change 2
2
# SPDX-License-Identifier: MPL-2.0
3
3
4
4
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
Original file line number Diff line number Diff line change @@ -14,8 +14,11 @@ class signal_stub(pyobj.ConfObject): pass
14
14
# port object
15
15
conf .sim .fail_on_warnings = False
16
16
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 ])
19
22
conf .sim .fail_on_warnings = True
20
23
21
24
SIM_register_interface ('signal_stub' , 'signal' , signal_interface_t (
You can’t perform that action at this time.
0 commit comments