All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ptest-runner: Added timeout per tests.
@ 2015-07-22 11:58 Lucian Musat
  2015-07-22 11:58 ` [PATCH 2/2] ptest-runner: Added the option to run a single package ptest suite Lucian Musat
  2015-07-22 15:52 ` [PATCH 1/2] ptest-runner: Added timeout per tests Burton, Ross
  0 siblings, 2 replies; 4+ messages in thread
From: Lucian Musat @ 2015-07-22 11:58 UTC (permalink / raw
  To: openembedded-core

Until now if a test hanged it would hang the whole process
indefinitely. I added a timeout so that if one test takes too
long it will kill it and skip to the next one.

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
---
 meta/recipes-support/ptest-runner/files/ptest-runner | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
index c618f11..a21102e 100644
--- a/meta/recipes-support/ptest-runner/files/ptest-runner
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -15,7 +15,7 @@ do
         date "+%Y-%m-%dT%H:%M"
         echo "BEGIN: $x"
         cd "$x"
-        ./run-ptest || ANYFAILED=yes
+        timeout 10m ./run-ptest || ANYFAILED=yes
         echo "END: $x"
         date "+%Y-%m-%dT%H:%M"
     done
-- 
2.1.4



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

* [PATCH 2/2] ptest-runner: Added the option to run a single package ptest suite.
  2015-07-22 11:58 [PATCH 1/2] ptest-runner: Added timeout per tests Lucian Musat
@ 2015-07-22 11:58 ` Lucian Musat
  2015-07-22 15:52 ` [PATCH 1/2] ptest-runner: Added timeout per tests Burton, Ross
  1 sibling, 0 replies; 4+ messages in thread
From: Lucian Musat @ 2015-07-22 11:58 UTC (permalink / raw
  To: openembedded-core

If you give it a ptest enabled package as a paramter it will run
only it's suite.

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
---
 .../ptest-runner/files/ptest-runner                | 47 +++++++++++++---------
 1 file changed, 28 insertions(+), 19 deletions(-)

diff --git a/meta/recipes-support/ptest-runner/files/ptest-runner b/meta/recipes-support/ptest-runner/files/ptest-runner
index a21102e..9f69602 100644
--- a/meta/recipes-support/ptest-runner/files/ptest-runner
+++ b/meta/recipes-support/ptest-runner/files/ptest-runner
@@ -1,27 +1,36 @@
 #!/bin/sh
-ANYFAILED=no
-echo "START: $0"
 
-for libdir in /usr/lib*
-do
+ARGS=("$@")
 
-    [ ! -d "$libdir" ] && continue
+ANYFAILED=no
+echo "START: $0"
 
-    for x in `ls -d $libdir/*/ptest 2>/dev/null`
+function run_ptest()
+{
+    for libdir in $1
     do
-        [ ! -f $x/run-ptest ] && continue
-        [ -h `dirname $x` ] && continue
-
-        date "+%Y-%m-%dT%H:%M"
-        echo "BEGIN: $x"
-        cd "$x"
-        timeout 10m ./run-ptest || ANYFAILED=yes
-        echo "END: $x"
-        date "+%Y-%m-%dT%H:%M"
+        [ ! -d "$libdir" ] && continue
+        for x in `ls -d $libdir*/ptest 2>/dev/null`
+        do
+            [ ! -f $x/run-ptest ] && continue
+            [ -h `dirname $x` ] && continue
+            date "+%Y-%m-%dT%H:%M"
+            echo "BEGIN: $x"
+            cd "$x"
+            timeout 10m ./run-ptest || ANYFAILED=yes
+            echo "END: $x"
+            date "+%Y-%m-%dT%H:%M"
+        done
     done
-done
-echo "STOP: $0"
-if [ "$ANYFAILED" = "yes"  ]; then
-    exit 1
+    echo "STOP: $0"
+    if [ "$ANYFAILED" = "yes"  ]; then
+        exit 1
+    fi
+}
+
+if [ "$#" -lt 1 ]; then
+    run_ptest '/usr/lib/*'
+else
+    run_ptest /usr/lib/${ARGS}
 fi
 exit 0
-- 
2.1.4



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

* Re: [PATCH 1/2] ptest-runner: Added timeout per tests.
  2015-07-22 11:58 [PATCH 1/2] ptest-runner: Added timeout per tests Lucian Musat
  2015-07-22 11:58 ` [PATCH 2/2] ptest-runner: Added the option to run a single package ptest suite Lucian Musat
@ 2015-07-22 15:52 ` Burton, Ross
  2015-07-23  8:51   ` Musat, George L
  1 sibling, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2015-07-22 15:52 UTC (permalink / raw
  To: Lucian Musat; +Cc: OE-core

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

On 22 July 2015 at 12:58, Lucian Musat <george.l.musat@intel.com> wrote:

> +        timeout 10m ./run-ptest || ANYFAILED=yes
>

I'm pretty sure the glib test suite takes *way* longer than 10 minutes to
run...

Ross

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

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

* Re: [PATCH 1/2] ptest-runner: Added timeout per tests.
  2015-07-22 15:52 ` [PATCH 1/2] ptest-runner: Added timeout per tests Burton, Ross
@ 2015-07-23  8:51   ` Musat, George L
  0 siblings, 0 replies; 4+ messages in thread
From: Musat, George L @ 2015-07-23  8:51 UTC (permalink / raw
  To: Burton, Ross; +Cc: OE-core

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

Hi Ross,

I ran the suite yesterday on a NUC with the timeout set at 10 minutes and the whole glib was ran:
“SUMMARY: total=215; passed=213; skipped=0; failed=2; user=105.5s; system=108.8s; maxrss=189256
END: /usr/lib/glib-2.0/ptest”

But feel free to modify the timeout to any value you think is better.

From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Wednesday, July 22, 2015 6:52 PM
To: Musat, George L
Cc: OE-core
Subject: Re: [OE-core] [PATCH 1/2] ptest-runner: Added timeout per tests.


On 22 July 2015 at 12:58, Lucian Musat <george.l.musat@intel.com<mailto:george.l.musat@intel.com>> wrote:
+        timeout 10m ./run-ptest || ANYFAILED=yes

I'm pretty sure the glib test suite takes *way* longer than 10 minutes to run...

Ross

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

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

end of thread, other threads:[~2015-07-23  8:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 11:58 [PATCH 1/2] ptest-runner: Added timeout per tests Lucian Musat
2015-07-22 11:58 ` [PATCH 2/2] ptest-runner: Added the option to run a single package ptest suite Lucian Musat
2015-07-22 15:52 ` [PATCH 1/2] ptest-runner: Added timeout per tests Burton, Ross
2015-07-23  8:51   ` Musat, George L

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.