Openembedded Bitbake Development
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <bitbake-devel@lists.openembedded.org>
Subject: [PATCH 1/3] lib/bb/tests/parse.py: Test case was changing chdir
Date: Tue, 25 Sep 2018 11:07:06 -0400	[thread overview]
Message-ID: <20180925150708.2983-2-mark.hatle@windriver.com> (raw)
In-Reply-To: <20180925150708.2983-1-mark.hatle@windriver.com>

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@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



  reply	other threads:[~2018-09-25 15:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25 15:07 [PATCH 0/3] Fix bitbake-selftest failures Mark Hatle
2018-09-25 15:07 ` Mark Hatle [this message]
2018-09-25 15:07 ` [PATCH 2/3] lib/layerindexlib/tests/cooker.py: Fix topdir to use an absolute (real) path Mark Hatle
2018-09-25 15:18   ` Mark Hatle
2018-09-25 15:07 ` [PATCH 3/3] lib/layerindexlib/tests/restapi.py: Fix test cases when BB_SKIP_NETTETS=yes Mark Hatle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180925150708.2983-2-mark.hatle@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox