[oe-commits] Richard Purdie : sanity: Don't make assumptions about cwd

git at git.openembedded.org git at git.openembedded.org
Mon Sep 2 11:12:30 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: 1cdc1b37b840bda961258cf2bfb2f75331bdb310
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1cdc1b37b840bda961258cf2bfb2f75331bdb310

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Sun Sep  1 16:19:32 2013 +0100

sanity: Don't make assumptions about cwd

When using the recently fixed out of build directory bitbake invocations, I was
puzzled why bitbake seemed to be pausing. The reason was due to running the sanity
tests each and every time. This was due to current working directory assumptions
within the sanity test code. Fix this to use TOPDIR.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/sanity.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 4df3ca8..feffed9 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -694,7 +694,7 @@ def check_sanity(sanity_data):
     last_sanity_version = 0
     last_tmpdir = ""
     last_sstate_dir = ""
-    sanityverfile = 'conf/sanity_info'
+    sanityverfile = sanity_data.expand("${TOPDIR}/conf/sanity_info")
     if os.path.exists(sanityverfile):
         with open(sanityverfile, 'r') as f:
             for line in f:
@@ -715,7 +715,8 @@ def check_sanity(sanity_data):
     else: 
         if last_sstate_dir != sstate_dir:
             status.addresult(check_sanity_sstate_dir_change(sstate_dir, sanity_data))
-    if os.path.exists("conf") and not status.messages:
+
+    if os.path.exists(os.path.dirname(sanityverfile)) and not status.messages:
         with open(sanityverfile, 'w') as f:
             f.write("SANITY_VERSION %s\n" % sanity_version) 
             f.write("TMPDIR %s\n" % tmpdir) 



More information about the Openembedded-commits mailing list