From: Jiajun Xu Date: Thu, 16 Dec 2010 08:04:00 +0000 (+0800) Subject: sanity.bbclass: Check if DISPLAY is set when IMAGETEST is set X-Git-Tag: 2011-1~3448 X-Git-Url: https://code.ossystems.io/gitweb?a=commitdiff_plain;h=b99fd0374e554f4d2183f349f271220951299c9a;p=openembedded-core.git 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 --- 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): 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]