[oe-commits] [openembedded-core] 52/68: oeqa/utils/buildproject: Only clean files if we've done something

git at git.openembedded.org git at git.openembedded.org
Mon Jan 28 17:07:51 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch thud-next
in repository openembedded-core.

commit 34efb674999781448411a04f876d6b3423ebe26c
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Fri Nov 9 12:48:39 2018 +0000

    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)
    
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/lib/oeqa/utils/buildproject.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/lib/oeqa/utils/buildproject.py b/meta/lib/oeqa/utils/buildproject.py
index 88e7b7f..01a803a 100644
--- a/meta/lib/oeqa/utils/buildproject.py
+++ b/meta/lib/oeqa/utils/buildproject.py
@@ -25,9 +25,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
@@ -52,5 +55,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)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list