Skip to contentSkip to conversation

Executive: Permit OSSTEST_TASK=<refkey> (for static tasks)

PATCH In review Ian Jackson 2 participants 2 messages Dec 8, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Executive: Permit OSSTEST_TASK=<refkey> (for static tasks)

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.

---
 Osstest/Executive.pm |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Osstest/Executive.pm +5 -3
index fcef83f..84c7d46 100644
@@ -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)." ?";
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Ian Jackson

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.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel