diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-07-22 15:24:20 +0100 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2016-07-22 15:24:20 +0100 |
commit | c20b6c56f68fe829965826dd0040bd1a1ddd76c7 (patch) | |
tree | a2a4d908a763019bbd49996023463b7650248cde /tests/testing/tests.py | |
parent | 84f138ba96201431513eb2ae5f847389ac731aa2 (diff) | |
download | gem5-c20b6c56f68fe829965826dd0040bd1a1ddd76c7.tar.xz |
tests: Add regex-based ignore rules for ref files
There are cases where we need to ignore files with specific extensions
(e.g., when Mercurial litters the file system with patch
rejects). Implement this functionality using a helper class
(FileIgnoreList) that supports both regular expressions and basic
string comparisons.
Change-Id: I34549754bd2e10ed230ffb2dc057403349f8fa78
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'tests/testing/tests.py')
-rw-r--r-- | tests/testing/tests.py | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/testing/tests.py b/tests/testing/tests.py index b2b821fd6..48e034bba 100644 --- a/tests/testing/tests.py +++ b/tests/testing/tests.py @@ -224,16 +224,23 @@ class ClassicTest(Test): # The diff ignore list contains all files that shouldn't be diffed # using DiffOutFile. These files typically use special-purpose # diff tools (e.g., DiffStatFile). - diff_ignore_files = ( - # Stat files use a special stat differ - "stats.txt", - ) + diff_ignore_files = FileIgnoreList( + names=( + # Stat files use a special stat differ + "stats.txt", + ), rex=( + )) # These files should never be included in the list of # reference files. This list should include temporary files # and other files that we don't care about. - ref_ignore_files = ( - ) + ref_ignore_files = FileIgnoreList( + names=( + ), rex=( + # Mercurial sometimes leaves backups when applying MQ patches + r"\.orig$", + r"\.rej$", + )) def __init__(self, gem5, output_dir, config_tuple, timeout=None, |