summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-08 22:01:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-22 22:46:37 +0100
commit20ed7727356e3c2fca7ce939f1e1a3c8f5fb47a3 (patch)
tree474ee09b7477e2f5486f0b3763829c6c0d749360
parentc52cd7466c5b8a0bd31f8e193ba43ddbf616e651 (diff)
downloadpoky-20ed7727356e3c2fca7ce939f1e1a3c8f5fb47a3.tar.gz
oeqa/selftest/sstatetests: Avoid polluting DL_DIR
Every selftest run is currently polluting the autobuilder DL_DIR. Avoid this by using a temporary directory for the test which is cleaned up. (From OE-Core rev: 3f2971c2fa94970057cd4260aa1147a165d70fa9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 002d321e02b3ce4f34c8a54211b109a5416c8a0e) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/sstatetests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py
index 9adb511960..c46e8ba489 100644
--- a/meta/lib/oeqa/selftest/cases/sstatetests.py
+++ b/meta/lib/oeqa/selftest/cases/sstatetests.py
@@ -19,10 +19,13 @@ class SStateTests(SStateBase):
19 # Test that a git repository which changes is correctly handled by SRCREV = ${AUTOREV} 19 # Test that a git repository which changes is correctly handled by SRCREV = ${AUTOREV}
20 # when PV does not contain SRCPV 20 # when PV does not contain SRCPV
21 21
22 tempdir = tempfile.mkdtemp(prefix='oeqa') 22 tempdir = tempfile.mkdtemp(prefix='sstate_autorev')
23 tempdldir = tempfile.mkdtemp(prefix='sstate_autorev_dldir')
23 self.track_for_cleanup(tempdir) 24 self.track_for_cleanup(tempdir)
25 self.track_for_cleanup(tempdldir)
24 create_temp_layer(tempdir, 'selftestrecipetool') 26 create_temp_layer(tempdir, 'selftestrecipetool')
25 self.add_command_to_tearDown('bitbake-layers remove-layer %s' % tempdir) 27 self.add_command_to_tearDown('bitbake-layers remove-layer %s' % tempdir)
28 self.append_config("DL_DIR = \"%s\"" % tempdldir)
26 runCmd('bitbake-layers add-layer %s' % tempdir) 29 runCmd('bitbake-layers add-layer %s' % tempdir)
27 30
28 # Use dbus-wait as a local git repo we can add a commit between two builds in 31 # Use dbus-wait as a local git repo we can add a commit between two builds in