[oe-commits] Stefan Stanacar : sanity: testimage needs DISPLAY set only for qemu targets

git at git.openembedded.org git at git.openembedded.org
Fri Apr 4 13:12:28 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 9fcd3af8626e1b0979b0cde745fe0880ccc50de7
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=9fcd3af8626e1b0979b0cde745fe0880ccc50de7

Author: Stefan Stanacar <stefanx.stanacar at intel.com>
Date:   Wed Apr  2 10:02:31 2014 +0000

sanity: testimage needs DISPLAY set only for qemu targets

There's no point in failing if DISPLAY isn't set if we don't
boot a qemu image when using a controller like SimpleRemoteTarget
or GummibootTarget.

Signed-off-by: Stefan Stanacar <stefanx.stanacar at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/sanity.bbclass | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index dd7fe4c..989bdcd 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -672,9 +672,11 @@ def check_sanity_everybuild(status, d):
 
     # Check if DISPLAY is set if TEST_IMAGE is set
     if d.getVar('TEST_IMAGE', True) == '1' or d.getVar('DEFAULT_TEST_SUITES', True):
-        display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True)
-        if not display:
-            status.addresult('testimage needs an X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n')
+        testtarget = d.getVar('TEST_TARGET', True)
+        if testtarget == 'qemu' or testtarget == 'QemuTarget':
+            display = d.getVar("BB_ORIGENV", False).getVar("DISPLAY", True)
+            if not display:
+                status.addresult('testimage needs an X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n')
 
     omask = os.umask(022)
     if omask & 0755:



More information about the Openembedded-commits mailing list