fixture.py (13679:bc1188a6c0f0) | fixture.py (13790:ed7f0a384c22) |
---|---|
1# Copyright (c) 2017 Mark D. Hill and David A. Wood 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 41 unchanged lines hidden (view full) --- 50 51 def setup(self, testitem): 52 self.path = tempfile.mkdtemp(prefix='gem5out') 53 54 def teardown(self, testitem): 55 if self.path is not None: 56 shutil.rmtree(self.path) 57 | 1# Copyright (c) 2017 Mark D. Hill and David A. Wood 2# All rights reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 41 unchanged lines hidden (view full) --- 50 51 def setup(self, testitem): 52 self.path = tempfile.mkdtemp(prefix='gem5out') 53 54 def teardown(self, testitem): 55 if self.path is not None: 56 shutil.rmtree(self.path) 57 |
58 def skip_cleanup(self): 59 # Set path to none so it's not deleted 60 self.path = None |
|
58 | 61 |
62 |
|
59class SConsFixture(Fixture): 60 ''' 61 Fixture will wait until all SCons targets are collected and tests are 62 about to be ran, then will invocate a single instance of SCons for all 63 targets. 64 65 :param directory: The directory which scons will -C (cd) into before 66 executing. If None is provided, will choose the config base_dir. --- 190 unchanged lines hidden --- | 63class SConsFixture(Fixture): 64 ''' 65 Fixture will wait until all SCons targets are collected and tests are 66 about to be ran, then will invocate a single instance of SCons for all 67 targets. 68 69 :param directory: The directory which scons will -C (cd) into before 70 executing. If None is provided, will choose the config base_dir. --- 190 unchanged lines hidden --- |