From: Ross Burton Date: Fri, 16 Oct 2015 10:44:49 +0000 (+0100) Subject: oeqa/selftest: clean up selftest.inc in teardown X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~28590 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=573bd03a7844a5ad762533f65f41214df31cd197;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/selftest: clean up selftest.inc in teardown Test cases may want to do call bitbake in setUpClass() but at that point the previous selftest.inc is still present which could change the build configuration and result in any built artifacts being removed in the next bitbake invocation as part of the sysroot clean up. Resolve this by cleaning selftest.inc in the tearDown, the clean in setUp should be considered a safety net. Signed-off-by: Ross Burton --- diff --git a/meta/lib/oeqa/selftest/base.py b/meta/lib/oeqa/selftest/base.py index b2faa661e53..9bddc23f87b 100644 --- a/meta/lib/oeqa/selftest/base.py +++ b/meta/lib/oeqa/selftest/base.py @@ -31,7 +31,7 @@ class oeSelfTest(unittest.TestCase): self.testinc_bblayers_path = os.path.join(self.builddir, "conf/bblayers.inc") self.testlayer_path = oeSelfTest.testlayer_path self._extra_tear_down_commands = [] - self._track_for_cleanup = [] + self._track_for_cleanup = [self.testinc_path] super(oeSelfTest, self).__init__(methodName) def setUp(self):