tests: Added functionality to allow the ignoring of test suites
authorBobby R. Bruce <bbruce@ucdavis.edu>
Sat, 23 Nov 2019 00:16:58 +0000 (16:16 -0800)
committerBobby R. Bruce <bbruce@ucdavis.edu>
Wed, 8 Jan 2020 21:44:52 +0000 (21:44 +0000)
Previously, when `tests/main.py run` was executed all the tests found
were run. It is now necessary to ignore some test suites as they fail.
Therefore, `gem5/suite.py` has been updated to read from `gem5/.testignore`
(if present). This file contains a list of all the test suites which are to
be ignored.

Change-Id: I699ea662b701d82199980084261496f24b13d340
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/23023
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
tests/gem5/suite.py

index 8a8c76d53f782cede1375d2e27891f618ccf6e69..2c4879759b27fac876313d4a1202eaedc5c84f7f 100644 (file)
@@ -75,6 +75,16 @@ def gem5_verify_config(name,
     '''
     fixtures = list(fixtures)
     testsuites = []
+
+    # Obtain the set of tests to ignore. This is found in the
+    # ".testignore" file.
+    __location__ = os.path.realpath(
+        os.path.join(os.getcwd(), os.path.dirname(__file__)))
+    _test_ignore_file_loc = os.path.join(__location__,".testignore")
+    ignore = set()
+    if os.path.exists(_test_ignore_file_loc):
+        ignore.update(open(_test_ignore_file_loc).read().splitlines())
+
     for opt in valid_variants:
         for isa in valid_isas:
 
@@ -91,6 +101,11 @@ def gem5_verify_config(name,
             if protocol:
                 _name += '-'+protocol
 
+            # We check to see if this test suite is to be ignored. If so, we
+            # skip it.
+            if _name in ignore:
+                continue
+
             # Create the running of gem5 subtest.
             # NOTE: We specifically create this test before our verifiers so
             # this is listed first.