]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest/sstatetests: Avoid polluting DL_DIR
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 8 Jul 2020 21:01:34 +0000 (22:01 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 12 Jul 2020 11:20:38 +0000 (12:20 +0100)
Every selftest run is currently polluting the autobuilder DL_DIR. Avoid
this by using a temporary directory for the test which is cleaned up.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/selftest/cases/sstatetests.py

index 9adb511960c974a15c39e65927fc9c91b3e6985d..c46e8ba489a8ba9c4081ead8ce2533845bb6fb15 100644 (file)
@@ -19,10 +19,13 @@ class SStateTests(SStateBase):
         # Test that a git repository which changes is correctly handled by SRCREV = ${AUTOREV}
         # when PV does not contain SRCPV
 
-        tempdir = tempfile.mkdtemp(prefix='oeqa')
+        tempdir = tempfile.mkdtemp(prefix='sstate_autorev')
+        tempdldir = tempfile.mkdtemp(prefix='sstate_autorev_dldir')
         self.track_for_cleanup(tempdir)
+        self.track_for_cleanup(tempdldir)
         create_temp_layer(tempdir, 'selftestrecipetool')
         self.add_command_to_tearDown('bitbake-layers remove-layer %s' % tempdir)
+        self.append_config("DL_DIR = \"%s\"" % tempdldir)
         runCmd('bitbake-layers add-layer %s' % tempdir)
 
         # Use dbus-wait as a local git repo we can add a commit between two builds in