]> code.ossystems Code Review - openembedded-core.git/commitdiff
sanity.bbclass: Check if DISPLAY is set when IMAGETEST is set
authorJiajun Xu <jiajun.xu@intel.com>
Thu, 16 Dec 2010 08:04:00 +0000 (16:04 +0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 16 Dec 2010 15:27:14 +0000 (15:27 +0000)
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>

meta/classes/sanity.bbclass

index e1f37ac1f444fb3fcd8034e90182f66b3e9b38e8..bc02a828c42365ab16e54cc03b3ad32b88c8154a 100644 (file)
@@ -139,6 +139,10 @@ def check_sanity(e):
                missing = missing.rstrip(',')
                messages = messages + "Please install following missing utilities: %s\n" % missing
 
+       # Check if DISPLAY is set if IMAGETEST is set
+       if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu':
+               messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
+
        # Ensure we have the binary for TERMCMD, as when patch application fails the error is fairly intimidating
        termcmd = data.getVar("TERMCMD", e.data, True)
        term = termcmd.split()[0]