Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/12086

Change subject: systemc: Generalize ignoring info messages in the reference output.
......................................................................

systemc: Generalize ignoring info messages in the reference output.

Those messages are very implementation specific and don't (generally)
affect correctness. This makes it easier to ignore info messages based
on their number.

This change also makes the output checker ignore a similarly styled
message gem5 generates. We should consider making gem5 not generate
that message and have it generate another message instead which is
specific to gem5. We would need to filter that out too when comparing
results.

Change-Id: I93b9e2d547b6259512db091cfc557d21f86f4a3d
---
M src/systemc/tests/verify.py
1 file changed, 15 insertions(+), 7 deletions(-)



diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py
index 6667b13..4c30773 100755
--- a/src/systemc/tests/verify.py
+++ b/src/systemc/tests/verify.py
@@ -184,27 +184,35 @@
         with open(self.text) as test_f, open(self.ref) as ref_f:
             return test_f.read() == ref_f.read()

+def tagged_filt(tag, num):
+    return (r'^\n{}: \({}{}\) .*\n(In file: .*\n)?'
+            r'(In process: [\w.]* @ .*\n)?').format(tag, tag[0], num)
+
+def warning_filt(num):
+    return tagged_filt('Warning', num)
+
+def info_filt(num):
+    return tagged_filt('Info', num)
+
 class LogChecker(Checker):
     def merge_filts(*filts):
         filts = map(lambda f: '(' + f + ')', filts)
         filts = '|'.join(filts)
         return re.compile(filts, flags=re.MULTILINE)

-    def warning_filt(num):
-        return (r'^\nWarning: \(W{}\) .*\n(In file: .*\n)?'
-                r'(In process: [\w.]* @ .*\n)?').format(num)
-
     ref_filt = merge_filts(
         r'^\nInfo: /OSCI/SystemC: Simulation stopped by user.\n',
         r'^SystemC Simulation\n',
+        r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: ' +
+        r'You can turn off(.*\n){7}',
         warning_filt(540),
         warning_filt(569),
         warning_filt(571),
-        r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: ' +
-        r'You can turn off(.*\n){7}'
+        info_filt(804),
     )
     test_filt = merge_filts(
-        r'^Global frequency set at \d* ticks per second\n'
+        r'^Global frequency set at \d* ticks per second\n',
+        info_filt(804),
     )

     def __init__(self, ref, test, tag, out_dir):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12086
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I93b9e2d547b6259512db091cfc557d21f86f4a3d
Gerrit-Change-Number: 12086
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to