From: Mark Hatle Date: Tue, 25 Sep 2018 15:07:06 +0000 (-0400) Subject: bitbake: lib/bb/tests/parse.py: Test case was changing chdir X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fae3cb56e907da3d0a750e92d1bb77e36c828d6;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: lib/bb/tests/parse.py: Test case was changing chdir 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 Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/tests/parse.py b/bitbake/lib/bb/tests/parse.py index 8f16ba4f4c5..1bc47405d98 100644 --- a/bitbake/lib/bb/tests/parse.py +++ b/bitbake/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)