]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest: clean up selftest.inc in teardown
authorRoss Burton <ross.burton@intel.com>
Fri, 16 Oct 2015 10:44:49 +0000 (11:44 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 21 Oct 2015 21:55:03 +0000 (22:55 +0100)
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 <ross.burton@intel.com>
meta/lib/oeqa/selftest/base.py

index b2faa661e53a1d9342aff91cbca83677760ef5df..9bddc23f87ba378939b3e27a0510e38d0b5281ff 100644 (file)
@@ -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):