All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RunOeSelftest.py: changed to new oe-selftest syntax
@ 2016-09-01 19:38 Humberto Ibarra
  0 siblings, 0 replies; only message in thread
From: Humberto Ibarra @ 2016-09-01 19:38 UTC (permalink / raw)
  To: yocto; +Cc: joshua.g.lock

oe-selftest is changing syntax with YOCTO #8938. This patch checks the correct syntax version and uses the right command to avoid breaking oe-seltest autobuilder. Should be integrated together with the syntax changing patch.

[YOCTO #8938]

Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
---
 .../autobuilder/buildsteps/RunOeSelftest.py              | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py b/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py
index 809bcc3..ce0c0f6 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py
@@ -34,9 +34,21 @@ class RunOeSelftest(ShellCommand):
         self.command += "netstat -an | grep -q 5901 ;"
         self.command += "if [ $? -ne 0 ]; then echo 'Starting a VNC server on :1'; vncserver :1; else echo 'Will use a VNC server already running on :1'; fi;"
         if self.tests == None:
-            self.command += "if [ -d ../meta-selftest ]; then export DISPLAY=:1; oe-selftest --run-all-tests; else echo 'Skipping step - no meta-selftest layer here'; fi"
+            oe_selftest_cmd = ('run', '--run-all-tests')
         else:
-            self.command += "if [ -d ../meta-selftest ]; then export DISPLAY=:1; oe-selftest " + self.tests + "; else echo 'Skipping step - no meta-selftest layer here'; fi"
+            oe_selftest_cmd = ("run --tests %s" % self.tests, "--run-tests %s" % self.tests)
+        self.command += """ \
+if [ -d ../meta-selftest ]; then \
+    export DISPLAY=:1; \
+    VERSION=$(oe-selftest --version 2> /dev/null | cut -d' ' -f2); \
+    if [ \"$VERSION\" == '2.0' ]; then \
+        oe-selftest %s; \
+    else \
+        oe-selftest %s; \
+    fi; \
+else \
+    echo 'Skipping step - no meta-selftest layer here';
+fi""" % oe_selftest_cmd
         ShellCommand.start(self)
 
     def _createOESelftestErrorReport(self, log):
-- 
2.4.11



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-09-01 19:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-01 19:38 [PATCH] RunOeSelftest.py: changed to new oe-selftest syntax Humberto Ibarra

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.