All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4][yocto-autobuilder] RunOeSelftest.py: changed to new oe-selftest syntax
@ 2016-09-02 15:18 Humberto Ibarra
  2016-09-02 16:56 ` Bill Randle
  0 siblings, 1 reply; 2+ messages in thread
From: Humberto Ibarra @ 2016-09-02 15:18 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.

[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 84d32fe..18629f0 100644
--- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py
+++ b/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py
@@ -33,9 +33,21 @@ class RunOeSelftest(ShellCommand):
         self.command += ". ./oe-init-build-env; "
         self.command += "checkvnc; "
         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] 2+ messages in thread

* Re: [PATCH v4][yocto-autobuilder] RunOeSelftest.py: changed to new oe-selftest syntax
  2016-09-02 15:18 [PATCH v4][yocto-autobuilder] RunOeSelftest.py: changed to new oe-selftest syntax Humberto Ibarra
@ 2016-09-02 16:56 ` Bill Randle
  0 siblings, 0 replies; 2+ messages in thread
From: Bill Randle @ 2016-09-02 16:56 UTC (permalink / raw)
  To: Humberto Ibarra; +Cc: joshua.g.lock, yocto

[-- Attachment #1: Type: text/plain, Size: 2275 bytes --]

On Sep 2, 2016 8:17 AM, "Humberto Ibarra" <humberto.ibarra.lopez@intel.com>
wrote:
>
> 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.
>
> [YOCTO #8938]
>
> Signed-off-by: Humberto Ibarra <humberto.ibarra.lopez@intel.com>
Acked-by: Bill Randle <billr@neocat.org>

> ---
>  .../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 84d32fe..18629f0 100644
> --- a/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py
> +++ b/lib/python2.7/site-packages/autobuilder/buildsteps/RunOeSelftest.py
> @@ -33,9 +33,21 @@ class RunOeSelftest(ShellCommand):
>          self.command += ". ./oe-init-build-env; "
>          self.command += "checkvnc; "
>          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
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

[-- Attachment #2: Type: text/html, Size: 3175 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-02 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02 15:18 [PATCH v4][yocto-autobuilder] RunOeSelftest.py: changed to new oe-selftest syntax Humberto Ibarra
2016-09-02 16:56 ` Bill Randle

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.