verify.py (13009:95e4bce41913) | verify.py (13010:09b975489550) |
---|---|
1#!/usr/bin/env python2 2# 3# Copyright 2018 Google, Inc. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 176 unchanged lines hidden (view full) --- 185 return test_f.read() == ref_f.read() 186 187class LogChecker(Checker): 188 def merge_filts(*filts): 189 filts = map(lambda f: '(' + f + ')', filts) 190 filts = '|'.join(filts) 191 return re.compile(filts, flags=re.MULTILINE) 192 | 1#!/usr/bin/env python2 2# 3# Copyright 2018 Google, Inc. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer; --- 176 unchanged lines hidden (view full) --- 185 return test_f.read() == ref_f.read() 186 187class LogChecker(Checker): 188 def merge_filts(*filts): 189 filts = map(lambda f: '(' + f + ')', filts) 190 filts = '|'.join(filts) 191 return re.compile(filts, flags=re.MULTILINE) 192 |
193 def warning_filt(num): 194 return (r'^\nWarning: \(W{}\) .*\n(In file: .*\n)?' 195 r'(In process: [\w.]* @ .*\n)?').format(num) 196 |
|
193 ref_filt = merge_filts( 194 r'^\nInfo: /OSCI/SystemC: Simulation stopped by user.\n', 195 r'^SystemC Simulation\n', | 197 ref_filt = merge_filts( 198 r'^\nInfo: /OSCI/SystemC: Simulation stopped by user.\n', 199 r'^SystemC Simulation\n', |
196 r'^\nWarning: .*\nIn file: .*\n' | 200 warning_filt(571), 201 warning_filt(540) |
197 ) 198 test_filt = merge_filts( 199 r'^Global frequency set at \d* ticks per second\n' 200 ) 201 202 def __init__(self, ref, test, tag, out_dir): 203 super(LogChecker, self).__init__(ref, test, tag) 204 self.out_dir = out_dir --- 302 unchanged lines hidden --- | 202 ) 203 test_filt = merge_filts( 204 r'^Global frequency set at \d* ticks per second\n' 205 ) 206 207 def __init__(self, ref, test, tag, out_dir): 208 super(LogChecker, self).__init__(ref, test, tag) 209 self.out_dir = out_dir --- 302 unchanged lines hidden --- |