aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-09 12:48:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-13 15:18:28 +0000
commitd38c3eac0a5a1a9b0eb98385832e92f48145655e (patch)
tree77cd13cb7ed090ac8b685a646c2fddc6d5d8904d /meta/lib
parent5a1a322cfca2a514707eeb48f4c3dce5e4c1ad48 (diff)
downloadopenembedded-core-contrib-d38c3eac0a5a1a9b0eb98385832e92f48145655e.tar.gz
oeqa/utils/buildproject: Only clean files if we've done something
We should only be wiping out things on target if the tests have actually run. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/buildproject.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py
index 721f35d996..7e9b84955f 100644
--- a/meta/lib/oeqa/utils/buildproject.py
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -24,9 +24,12 @@ class BuildProject(metaclass=ABCMeta):
self.fname = foldername
else:
self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive)
+ self.needclean = False
# Download self.archive to self.localarchive
def _download_archive(self):
+
+ self.needclean = True
if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)):
shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive)
return
@@ -51,5 +54,7 @@ class BuildProject(metaclass=ABCMeta):
return self._run('cd %s; make install %s' % (self.targetdir, install_args))
def clean(self):
+ if not self.needclean:
+ return
self._run('rm -rf %s' % self.targetdir)
subprocess.check_call('rm -f %s' % self.localarchive, shell=True)