verify.py (13134:23ee016d1f54) | verify.py (13137:a3750228268f) |
---|---|
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; --- 181 unchanged lines hidden (view full) --- 190 def check(self): 191 with open(self.text) as test_f, open(self.ref) as ref_f: 192 return test_f.read() == ref_f.read() 193 194def tagged_filt(tag, num): 195 return (r'^\n{}: \({}{}\) .*\n(In file: .*\n)?' 196 r'(In process: [\w.]* @ .*\n)?').format(tag, tag[0], num) 197 | 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; --- 181 unchanged lines hidden (view full) --- 190 def check(self): 191 with open(self.text) as test_f, open(self.ref) as ref_f: 192 return test_f.read() == ref_f.read() 193 194def tagged_filt(tag, num): 195 return (r'^\n{}: \({}{}\) .*\n(In file: .*\n)?' 196 r'(In process: [\w.]* @ .*\n)?').format(tag, tag[0], num) 197 |
198def error_filt(num): 199 return tagged_filt('Error', num) 200 |
|
198def warning_filt(num): 199 return tagged_filt('Warning', num) 200 201def info_filt(num): 202 return tagged_filt('Info', num) 203 204class LogChecker(Checker): 205 def merge_filts(*filts): --- 6 unchanged lines hidden (view full) --- 212 r'^SystemC Simulation\n', 213 r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: ' + 214 r'You can turn off(.*\n){7}', 215 r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: \n' + 216 r' sc_clock\(const char(.*\n){3}', 217 warning_filt(540), 218 warning_filt(569), 219 warning_filt(571), | 201def warning_filt(num): 202 return tagged_filt('Warning', num) 203 204def info_filt(num): 205 return tagged_filt('Info', num) 206 207class LogChecker(Checker): 208 def merge_filts(*filts): --- 6 unchanged lines hidden (view full) --- 215 r'^SystemC Simulation\n', 216 r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: ' + 217 r'You can turn off(.*\n){7}', 218 r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: \n' + 219 r' sc_clock\(const char(.*\n){3}', 220 warning_filt(540), 221 warning_filt(569), 222 warning_filt(571), |
223 error_filt(541), 224 error_filt(542), 225 error_filt(543), |
|
220 info_filt(804), 221 ) 222 test_filt = merge_filts( 223 r'^Global frequency set at \d* ticks per second\n', 224 info_filt(804), 225 ) 226 227 def __init__(self, ref, test, tag, out_dir): --- 316 unchanged lines hidden --- | 226 info_filt(804), 227 ) 228 test_filt = merge_filts( 229 r'^Global frequency set at \d* ticks per second\n', 230 info_filt(804), 231 ) 232 233 def __init__(self, ref, test, tag, out_dir): --- 316 unchanged lines hidden --- |