summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/_sstatetests_noauto.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/meta/lib/oeqa/selftest/_sstatetests_noauto.py b/meta/lib/oeqa/selftest/_sstatetests_noauto.py
index 5253334e12..97366d97ae 100644
--- a/meta/lib/oeqa/selftest/_sstatetests_noauto.py
+++ b/meta/lib/oeqa/selftest/_sstatetests_noauto.py
@@ -24,23 +24,15 @@ class RebuildFromSState(SStateBase):
24 return found_targets 24 return found_targets
25 25
26 def configure_builddir(self, builddir): 26 def configure_builddir(self, builddir):
27 if os.path.exists(builddir): 27 os.mkdir(builddir)
28 raise AssertionError("Cannot create build directory at %s: Path allready exists!" % builddir) 28 self.track_for_cleanup(builddir)
29 try:
30 os.mkdir(builddir)
31 except:
32 raise AssertionError("Cannot create %s . Make sure %s exists!" % (dst, os.path.dirname(dst)))
33 os.mkdir(os.path.join(builddir, 'conf')) 29 os.mkdir(os.path.join(builddir, 'conf'))
34 shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 'conf/local.conf'), os.path.join(builddir, 'conf/local.conf')) 30 shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 'conf/local.conf'), os.path.join(builddir, 'conf/local.conf'))
35 shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 'conf/bblayers.conf'), os.path.join(builddir, 'conf/bblayers.conf')) 31 shutil.copyfile(os.path.join(os.environ.get('BUILDDIR'), 'conf/bblayers.conf'), os.path.join(builddir, 'conf/bblayers.conf'))
36 32
37 def hardlink_tree(self, src, dst): 33 def hardlink_tree(self, src, dst):
38 if os.path.exists(dst): 34 os.mkdir(dst)
39 raise AssertionError("Cannot create directory at %s: Path allready exists!" % dst) 35 self.track_for_cleanup(dst)
40 try:
41 os.mkdir(dst)
42 except:
43 raise AssertionError("Cannot create %s . Make sure %s exists!" % (dst, os.path.dirname(dst)))
44 for root, dirs, files in os.walk(src): 36 for root, dirs, files in os.walk(src):
45 if root == src: 37 if root == src:
46 continue 38 continue
@@ -54,9 +46,6 @@ class RebuildFromSState(SStateBase):
54 buildB = os.path.join(self.builddir, 'buildB') 46 buildB = os.path.join(self.builddir, 'buildB')
55 else: 47 else:
56 buildB = buildA 48 buildB = buildA
57 self.track_for_cleanup(buildA)
58 self.track_for_cleanup(buildB)
59 self.track_for_cleanup(os.path.join(self.builddir, 'sstate-cache-buildA'))
60 49
61 if rebuild_dependencies: 50 if rebuild_dependencies:
62 rebuild_targets = self.get_dep_targets(primary_targets) 51 rebuild_targets = self.get_dep_targets(primary_targets)