sanity.bbclass: Check for DISPLAY for qemutests in BB_ORIGENV now

(From OE-Core rev: e43f8f917e4069d74b467dfd6aa29ff762e83a5e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie 2013-02-07 09:16:18 +00:00
parent a0ef94d3ae
commit 5db5904614
1 changed files with 4 additions and 2 deletions

View File

@ -499,8 +499,10 @@ def check_sanity(sanity_data):
messages = messages + toolchain_msg + '\n'
# Check if DISPLAY is set if IMAGETEST is set
if not sanity_data.getVar( 'DISPLAY', True ) and sanity_data.getVar( 'IMAGETEST', True ) == 'qemu':
messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
if sanity_data.getVar( 'IMAGETEST', True ) == 'qemu':
display = sanity_data.getVar("BB_ORIGENV", False).getVar("DISPLAY", True)
if not display:
messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
omask = os.umask(022)
if omask & 0755: