]> 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)
committerSteve Sakoman <steve@sakoman.com>
Tue, 14 Jul 2020 03:16:12 +0000 (17:16 -1000)
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>
(cherry picked from commit 002d321e02b3ce4f34c8a54211b109a5416c8a0e)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
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