]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bitbake: lib/bb/tests/parse.py: Test case was changing chdir
authorMark Hatle <mark.hatle@windriver.com>
Tue, 25 Sep 2018 15:07:06 +0000 (11:07 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 26 Sep 2018 14:14:33 +0000 (15:14 +0100)
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.

(Bitbake rev: 8c222c45148d1f21c2390d66ddd9d3e33b397f05)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake/lib/bb/tests/parse.py

index 8f16ba4f4c5303d156ae8c7c5bf3a1cbac34f47c..1bc47405d98fc3f3dc2e27ea44f21c3bf44bfc0c 100644 (file)
@@ -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)