-#!/usr/bin/env python
+#!/usr/bin/env python2
#
# Copyright (c) 2016 ARM Limited
# All rights reserved
for u in self.verify_units()
]
- return TestResult(self.test_name, run_results + verify_results)
+ return TestResult(self.test_name,
+ run_results=run_results,
+ verify_results=verify_results)
def __str__(self):
return self.test_name
class ClassicTest(Test):
- diff_ignore_files = [
- # Stat files use a special stat differ, so don't include them
- # here.
- "stats.txt",
- ]
+ # 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 = 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 = FileIgnoreList(
+ names=(
+ "EMPTY",
+ ), rex=(
+ # Mercurial sometimes leaves backups when applying MQ patches
+ r"\.orig$",
+ r"\.rej$",
+ ))
def __init__(self, gem5, output_dir, config_tuple,
timeout=None,
for root, dirs, files in os.walk(ref_dir, topdown=False):
for f in files:
fpath = os.path.join(root[len(ref_dir) + 1:], f)
- if fpath not in ClassicTest.diff_ignore_files:
+ if fpath not in ClassicTest.ref_ignore_files:
yield fpath
def run_units(self):
]
def verify_units(self):
- return [
- DiffStatFile(ref_dir=self.ref_dir, test_dir=self.output_dir,
- skip=self.skip_diff_stat)
- ] + [
+ ref_files = set(self.ref_files())
+ units = []
+ if "stats.txt" in ref_files:
+ units.append(
+ DiffStatFile(ref_dir=self.ref_dir, test_dir=self.output_dir,
+ skip=self.skip_diff_stat))
+ units += [
DiffOutFile(f,
ref_dir=self.ref_dir, test_dir=self.output_dir,
skip=self.skip_diff_out)
- for f in self.ref_files()
- if f not in ClassicTest.diff_ignore_files
+ for f in ref_files if f not in ClassicTest.diff_ignore_files
]
+ return units
+
def update_ref(self):
for fname in self.ref_files():
shutil.copy(
if ruby_protocol == 'MI_example':
configs += [ "%s-ruby" % (c, ) for c in configs ]
elif ruby_protocol is not None:
- configs += [ "%s-ruby-%s" % (c, ruby_protocol) for c in configs ]
+ # Override generic ISA configs when using Ruby (excluding
+ # MI_example which is included in all ISAs by default). This
+ # reduces the number of generic tests we re-run for when
+ # compiling Ruby targets.
+ configs = [ "%s-ruby-%s" % (c, ruby_protocol) for c in configs ]
# /(quick|long)/(fs|se)/workload/ref/arch/guest/config/
for conf_script in configs: