diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-08 22:01:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-12 12:21:48 +0100 |
commit | 05aabd3744f71f73e944adc787caec0faff6d9e6 (patch) | |
tree | a19a6c5d8f4684ed1e2eec591d2a9a5902860556 | |
parent | 5295524a4cbbf9a71569a875984085f8b231430c (diff) | |
download | poky-05aabd3744f71f73e944adc787caec0faff6d9e6.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: 002d321e02b3ce4f34c8a54211b109a5416c8a0e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/sstatetests.py | 5 |
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 |