From: Ian Jackson Date: Tue, 8 Dec 2015 14:11:47 +0000 (+0000) Subject: Executive: Permit OSSTEST_TASK= (for static tasks) X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d1c61c34b9c21393fcd6ed5e58a0cab9aceea184;p=people%2Fiwj%2Fosstest.git Executive: Permit OSSTEST_TASK= (for static tasks) If OSSTEST_TASK is not set, we construct a from the username and the nodename, and look for a such a static task. If OSSTEST_TASK /is/ set would require it to contain ` '. In this patch, permit OSSTEST_TASK to be set simply to the . This is much more convenient and doesn't involve manually looking up taskids. The risk of error seems negligible. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index fcef83f0..84c7d466 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(<execute($refkey); + $q->execute($spec); } else { my @l = split /\s+/, $spec; @l==3 or die "$spec ".scalar(@l)." ?";