[bitbake-devel] [PATCH 1/3] lib/bb/tests/parse.py: Test case was changing chdir

Mark Hatle mark.hatle at windriver.com
Tue Sep 25 15:07:06 UTC 2018


The test case was changing the current directory, but was never restoring it
to the original location.  This causes occasional failures in later test cases.

Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
 lib/bb/tests/parse.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/bb/tests/parse.py b/lib/bb/tests/parse.py
index 8f16ba4..1bc4740 100644
--- a/lib/bb/tests/parse.py
+++ b/lib/bb/tests/parse.py
@@ -44,9 +44,13 @@ C = "3"
 """
 
     def setUp(self):
+        self.origdir = os.getcwd()
         self.d = bb.data.init()
         bb.parse.siggen = bb.siggen.init(self.d)
 
+    def tearDown(self):
+        os.chdir(self.origdir)
+
     def parsehelper(self, content, suffix = ".bb"):
 
         f = tempfile.NamedTemporaryFile(suffix = suffix)
-- 
1.8.3.1




More information about the bitbake-devel mailing list