All of lore.kernel.org
 help / color / mirror / Atom feed
* [OSSTEST PATCH] Executive: Permit OSSTEST_TASK=<refkey> (for static tasks)
@ 2015-12-08 14:19 Ian Jackson
  2015-12-08 14:33 ` Ian Campbell
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Jackson @ 2015-12-08 14:19 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Ian Campbell

If OSSTEST_TASK is not set, we construct a <refkey> from the username
and the nodename, and look for a such a static task.  If OSSTEST_TASK
/is/ set would require it to contain `<taskid> <type> <refkey>'.

In this patch, permit OSSTEST_TASK to be set simply to the <refkey>.
This is much more convenient and doesn't involve manually looking up
taskids.  The risk of error seems negligible.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
 Osstest/Executive.pm |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index fcef83f..84c7d46 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -446,13 +446,15 @@ sub findtask () {
     if (!defined $spec) {
         $!=0; $?=0; my $node=   `uname -n`; defined $node   or die "$? $!";
         chomp($node); $node =~ s/\..*//;
-        my $refkey= "$c{Username}\@$node";
-        $what= "static $refkey";
+	$spec= "$c{Username}\@$node";
+    }
+    if ($spec !~ m/\s/) {
+        $what= "static $spec";
         $q= $dbh_tests->prepare(<<END);
             SELECT * FROM tasks
                     WHERE type='static' AND refkey=?
 END
-        $q->execute($refkey);
+        $q->execute($spec);
     } else {
         my @l = split /\s+/, $spec;
         @l==3 or die "$spec ".scalar(@l)." ?";
-- 
1.7.10.4

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

end of thread, other threads:[~2015-12-08 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-08 14:19 [OSSTEST PATCH] Executive: Permit OSSTEST_TASK=<refkey> (for static tasks) Ian Jackson
2015-12-08 14:33 ` Ian Campbell

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.