verify.py (13137:a3750228268f) | verify.py (13139:78d9cd67bbdf) |
---|---|
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; --- 196 unchanged lines hidden (view full) --- 205 return tagged_filt('Info', num) 206 207class LogChecker(Checker): 208 def merge_filts(*filts): 209 filts = map(lambda f: '(' + f + ')', filts) 210 filts = '|'.join(filts) 211 return re.compile(filts, flags=re.MULTILINE) 212 | 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; --- 196 unchanged lines hidden (view full) --- 205 return tagged_filt('Info', num) 206 207class LogChecker(Checker): 208 def merge_filts(*filts): 209 filts = map(lambda f: '(' + f + ')', filts) 210 filts = '|'.join(filts) 211 return re.compile(filts, flags=re.MULTILINE) 212 |
213 # The reporting mechanism will print the actual filename when running in 214 # gem5, and the "golden" output will say "<removed by verify.py>". We want 215 # to strip out both versions to make comparing the output sensible. 216 in_file_filt = r'^In file: ((<removed by verify\.pl>)|([a-zA-Z0-9.:_/]*))$' 217 |
|
213 ref_filt = merge_filts( 214 r'^\nInfo: /OSCI/SystemC: Simulation stopped by user.\n', 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), 226 info_filt(804), | 218 ref_filt = merge_filts( 219 r'^\nInfo: /OSCI/SystemC: Simulation stopped by user.\n', 220 r'^SystemC Simulation\n', 221 r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: ' + 222 r'You can turn off(.*\n){7}', 223 r'^\nInfo: \(I804\) /IEEE_Std_1666/deprecated: \n' + 224 r' sc_clock\(const char(.*\n){3}', 225 warning_filt(540), 226 warning_filt(569), 227 warning_filt(571), 228 error_filt(541), 229 error_filt(542), 230 error_filt(543), 231 info_filt(804), |
232 in_file_filt, |
|
227 ) 228 test_filt = merge_filts( 229 r'^Global frequency set at \d* ticks per second\n', 230 info_filt(804), | 233 ) 234 test_filt = merge_filts( 235 r'^Global frequency set at \d* ticks per second\n', 236 info_filt(804), |
237 in_file_filt, |
|
231 ) 232 233 def __init__(self, ref, test, tag, out_dir): 234 super(LogChecker, self).__init__(ref, test, tag) 235 self.out_dir = out_dir 236 237 def apply_filters(self, data, filts): 238 re.sub(filt, '', data) --- 311 unchanged lines hidden --- | 238 ) 239 240 def __init__(self, ref, test, tag, out_dir): 241 super(LogChecker, self).__init__(ref, test, tag) 242 self.out_dir = out_dir 243 244 def apply_filters(self, data, filts): 245 re.sub(filt, '', data) --- 311 unchanged lines hidden --- |