提交 bf574f12 编写于 作者: S Simon Glass

binman: Add a test function to clean up the output dir

Put tearDown()'s logic into a new _CleanupOutputDir() function so that it
can be called from elsewhere.
Signed-off-by: NSimon Glass <sjg@chromium.org>
上级 f6e02497
......@@ -187,6 +187,13 @@ class TestFunctional(unittest.TestCase):
if not self.have_lz4:
self.skipTest('lz4 --no-frame-crc not available')
def _CleanupOutputDir(self):
"""Remove the temporary output directory"""
if self.preserve_outdirs:
print('Preserving output dir: %s' % tools.outdir)
else:
tools._FinaliseForTest()
def setUp(self):
# Enable this to turn on debugging output
# tout.Init(tout.DEBUG)
......@@ -194,10 +201,7 @@ class TestFunctional(unittest.TestCase):
def tearDown(self):
"""Remove the temporary output directory"""
if self.preserve_outdirs:
print('Preserving output dir: %s' % tools.outdir)
else:
tools._FinaliseForTest()
self._CleanupOutputDir()
@classmethod
def _ResetDtbs(self):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册