summaryrefslogtreecommitdiffstats
path: root/meta/classes/sanity.bbclass
diff options
context:
space:
mode:
authorJiajun Xu <jiajun.xu@intel.com>2010-12-16 16:04:00 +0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-16 15:27:14 +0000
commitb99fd0374e554f4d2183f349f271220951299c9a (patch)
tree5045d8250246244c166b6fa75cf5177ffdc0c50f /meta/classes/sanity.bbclass
parentace52b0da36d2909c1aaf344ff5f321a8de777ba (diff)
downloadpoky-b99fd0374e554f4d2183f349f271220951299c9a.tar.gz
sanity.bbclass: Check if DISPLAY is set when IMAGETEST is set
Fixes [BUGID: 594] In imagetest-qemu.bbclass, we depend on DISPLAY to start qemu in a X desktop. When user wants to run qemu sanity test, we need to check if the variable is set. Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
Diffstat (limited to 'meta/classes/sanity.bbclass')
-rw-r--r--meta/classes/sanity.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index e1f37ac1f4..bc02a828c4 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -139,6 +139,10 @@ def check_sanity(e):
139 missing = missing.rstrip(',') 139 missing = missing.rstrip(',')
140 messages = messages + "Please install following missing utilities: %s\n" % missing 140 messages = messages + "Please install following missing utilities: %s\n" % missing
141 141
142 # Check if DISPLAY is set if IMAGETEST is set
143 if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu':
144 messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
145
142 # Ensure we have the binary for TERMCMD, as when patch application fails the error is fairly intimidating 146 # Ensure we have the binary for TERMCMD, as when patch application fails the error is fairly intimidating
143 termcmd = data.getVar("TERMCMD", e.data, True) 147 termcmd = data.getVar("TERMCMD", e.data, True)
144 term = termcmd.split()[0] 148 term = termcmd.split()[0]