Skip to contentSkip to conversation

tests/fetch: Allow bit/bitbake-selftest to function correctly

PATCH New Richard Purdie 1 participant 2 messages Jan 7, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tests/fetch: Allow bit/bitbake-selftest to function correctly

Without this the paths to git-make-shallow are incorrect and cause test failures if bitbake isn't executed from cwd or PATH.

---
 lib/bb/tests/fetch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/tests/fetch.py +1 -1
index 7d7c5d7..11698f2 100644
@@ -874,7 +874,7 @@ class FetchCheckStatusTest(FetcherTest):
 
 
 class GitMakeShallowTest(FetcherTest):
-    bitbake_dir = os.path.join(os.path.dirname(os.path.join(__file__)), '..', '..', '..')
+    bitbake_dir = os.path.join(os.path.dirname(os.path.join(os.path.abspath(__file__))), '..', '..', '..')
     make_shallow_path = os.path.join(bitbake_dir, 'bin', 'git-make-shallow')
 
     def setUp(self):
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 events: Drop unused cfg property

The cfg property on events doesn't add much, all code appears to access "data" at this point. Remove it to clean up the interface.

---
 lib/bb/event.py | 9 ---------
 1 file changed, 9 deletions(-)
lib/bb/event.py +0 -9
index 52072b5..5d00496 100644
@@ -449,12 +449,6 @@ class BuildBase(Event):
     def setName(self, name):
         self._name = name
 
-    def getCfg(self):
-        return self.data
-
-    def setCfg(self, cfg):
-        self.data = cfg
-
     def getFailures(self):
         """
         Return the number of failed packages
@@ -463,9 +457,6 @@ class BuildBase(Event):
 
     pkgs = property(getPkgs, setPkgs, None, "pkgs property")
     name = property(getName, setName, None, "name property")
-    cfg = property(getCfg, setCfg, None, "cfg property")
-
-
 
 class BuildInit(BuildBase):
     """buildFile or buildTargets was invoked"""
Signature · 1 line
2.7.4