diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-11-09 12:48:39 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:27:45 +0000 |
| commit | 4b21bf658f638700b7b9c6dd0792f23602b6ff66 (patch) | |
| tree | fa7010a1be3d59cf3af484b115fc2ddfc87934d0 /meta/lib | |
| parent | 0bda55062765da0797c871d6f9bc02b527837299 (diff) | |
| download | poky-4b21bf658f638700b7b9c6dd0792f23602b6ff66.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.
(From OE-Core rev: d38c3eac0a5a1a9b0eb98385832e92f48145655e)
(From OE-Core rev: dab22dc58eabaeb421afa3c7de1cc08c5ec34c61)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
| -rw-r--r-- | meta/lib/oeqa/utils/buildproject.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py index 88e7b7fe27..01a803ab61 100644 --- a/meta/lib/oeqa/utils/buildproject.py +++ b/meta/lib/oeqa/utils/buildproject.py | |||
| @@ -25,9 +25,12 @@ class BuildProject(metaclass=ABCMeta): | |||
| 25 | self.fname = foldername | 25 | self.fname = foldername |
| 26 | else: | 26 | else: |
| 27 | self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive) | 27 | self.fname = re.sub(r'\.tar\.bz2$|\.tar\.gz$|\.tar\.xz$', '', self.archive) |
| 28 | self.needclean = False | ||
| 28 | 29 | ||
| 29 | # Download self.archive to self.localarchive | 30 | # Download self.archive to self.localarchive |
| 30 | def _download_archive(self): | 31 | def _download_archive(self): |
| 32 | |||
| 33 | self.needclean = True | ||
| 31 | if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)): | 34 | if self.dl_dir and os.path.exists(os.path.join(self.dl_dir, self.archive)): |
| 32 | shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive) | 35 | shutil.copyfile(os.path.join(self.dl_dir, self.archive), self.localarchive) |
| 33 | return | 36 | return |
| @@ -52,5 +55,7 @@ class BuildProject(metaclass=ABCMeta): | |||
| 52 | return self._run('cd %s; make install %s' % (self.targetdir, install_args)) | 55 | return self._run('cd %s; make install %s' % (self.targetdir, install_args)) |
| 53 | 56 | ||
| 54 | def clean(self): | 57 | def clean(self): |
| 58 | if not self.needclean: | ||
| 59 | return | ||
| 55 | self._run('rm -rf %s' % self.targetdir) | 60 | self._run('rm -rf %s' % self.targetdir) |
| 56 | subprocess.check_call('rm -f %s' % self.localarchive, shell=True) | 61 | subprocess.check_call('rm -f %s' % self.localarchive, shell=True) |
