summaryrefslogtreecommitdiff
path: root/ext/testlib/loader.py
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2019-06-18 11:50:24 +0100
committerNikos Nikoleris <nikos.nikoleris@arm.com>2019-08-09 14:03:21 +0000
commit8282b7408b68187155e8109ba4dd267f5bac2c94 (patch)
treebc2dccba05924152defe59c2f058a58efccabd77 /ext/testlib/loader.py
parent52189147737c7b2c727e42e07676547083469dff (diff)
downloadgem5-8282b7408b68187155e8109ba4dd267f5bac2c94.tar.xz
tests: Refactor the Gem5Fixture to derive from UniqueFixture
Gem5Fixture is used to define a fixture for building the gem5 binary. Most tests are expected to define their own Gem5Fixture, however, as some might depend on the same binary (e.g., ./build/ARM/gem5.opt), they will try to re-define a fixture for the same target. This patchset changes Gem5Fixture to derive from UniqueFixture. In addition, this patchset changes the way global fixtures are discovered to work with the new Gem5Fixture class. Instead of enumerating them when test definitions are loaded, we do so after the tests have been filtered according to specified tags (e.g., include opt variant, exclude fast, debug variants). Change-Id: Ie868a7e18ef6c3271f3c8a658229657cd43997cb Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19251 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Diffstat (limited to 'ext/testlib/loader.py')
-rw-r--r--ext/testlib/loader.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/testlib/loader.py b/ext/testlib/loader.py
index e788c33a9..8f8f60e70 100644
--- a/ext/testlib/loader.py
+++ b/ext/testlib/loader.py
@@ -147,7 +147,7 @@ class Loader(object):
@property
def schedule(self):
- return wrappers.LoadedLibrary(self.suites, fixture_mod.global_fixtures)
+ return wrappers.LoadedLibrary(self.suites)
def load_schedule_for_suites(self, *uids):
files = {uid.UID.uid_to_path(id_) for id_ in uids}
@@ -155,8 +155,7 @@ class Loader(object):
self.load_file(file_)
return wrappers.LoadedLibrary(
- [self.suite_uids[id_] for id_ in uids],
- fixture_mod.global_fixtures)
+ [self.suite_uids[id_] for id_ in uids])
def _verify_no_duplicate_suites(self, new_suites):
new_suite_uids = self.suite_uids.copy()