tests: Refactor the Gem5Fixture to derive from UniqueFixture
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Tue, 18 Jun 2019 10:50:24 +0000 (11:50 +0100)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Fri, 9 Aug 2019 14:03:21 +0000 (14:03 +0000)
commit8282b7408b68187155e8109ba4dd267f5bac2c94
treebc2dccba05924152defe59c2f058a58efccabd77
parent52189147737c7b2c727e42e07676547083469dff
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>
ext/testlib/fixture.py
ext/testlib/loader.py
ext/testlib/main.py
ext/testlib/wrappers.py
tests/gem5/fixture.py