summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-01 16:19:32 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-01 16:25:15 +0100
commit5894ac1f38cdbc74b8197710bd64fc79b05aec87 (patch)
tree4afe36d2fa24743136513ea25d16e6944b9defad
parent554c892ccf16ca564e7be94f84eaa73667170e15 (diff)
downloadpoky-5894ac1f38cdbc74b8197710bd64fc79b05aec87.tar.gz
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. (From OE-Core rev: 1cdc1b37b840bda961258cf2bfb2f75331bdb310) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/sanity.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 4df3ca8001..feffed9431 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -694,7 +694,7 @@ def check_sanity(sanity_data):
694 last_sanity_version = 0 694 last_sanity_version = 0
695 last_tmpdir = "" 695 last_tmpdir = ""
696 last_sstate_dir = "" 696 last_sstate_dir = ""
697 sanityverfile = 'conf/sanity_info' 697 sanityverfile = sanity_data.expand("${TOPDIR}/conf/sanity_info")
698 if os.path.exists(sanityverfile): 698 if os.path.exists(sanityverfile):
699 with open(sanityverfile, 'r') as f: 699 with open(sanityverfile, 'r') as f:
700 for line in f: 700 for line in f:
@@ -715,7 +715,8 @@ def check_sanity(sanity_data):
715 else: 715 else:
716 if last_sstate_dir != sstate_dir: 716 if last_sstate_dir != sstate_dir:
717 status.addresult(check_sanity_sstate_dir_change(sstate_dir, sanity_data)) 717 status.addresult(check_sanity_sstate_dir_change(sstate_dir, sanity_data))
718 if os.path.exists("conf") and not status.messages: 718
719 if os.path.exists(os.path.dirname(sanityverfile)) and not status.messages:
719 with open(sanityverfile, 'w') as f: 720 with open(sanityverfile, 'w') as f:
720 f.write("SANITY_VERSION %s\n" % sanity_version) 721 f.write("SANITY_VERSION %s\n" % sanity_version)
721 f.write("TMPDIR %s\n" % tmpdir) 722 f.write("TMPDIR %s\n" % tmpdir)