diff --git a/ext/testlib/fixture.py b/ext/testlib/fixture.py index ffff54cd88..be8924474f 100644 --- a/ext/testlib/fixture.py +++ b/ext/testlib/fixture.py @@ -98,6 +98,13 @@ class Fixture(object): def copy(self): return copy.deepcopy(self) + def skip_cleanup(self): + ''' + If this method is called, then we should make sure that nothing is + done when the teardown() function is called. + ''' + pass + def globalfixture(fixture): ''' diff --git a/tests/gem5/fixture.py b/tests/gem5/fixture.py index df834ef75b..9d9319c1e7 100644 --- a/tests/gem5/fixture.py +++ b/tests/gem5/fixture.py @@ -55,6 +55,10 @@ class TempdirFixture(Fixture): if self.path is not None: shutil.rmtree(self.path) + def skip_cleanup(self): + # Set path to none so it's not deleted + self.path = None + class SConsFixture(Fixture): '''