diff mbox

[3/7] osstest: fix regular expression used to match buildjob in ts-build-check

Message ID 20170523135148.77673-4-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monne May 23, 2017, 1:51 p.m. UTC
Current regular expression used to match the buildjob works correctly when the
buildjob runvar has the <job_name>buildjob format, but not when the format is
<job_name>_buildjob (the first match group is empty in this case). Change it so
that it works for both formats.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 ts-build-check | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ian Jackson May 23, 2017, 3:01 p.m. UTC | #1
Roger Pau Monne writes ("[PATCH 3/7] osstest: fix regular expression used to match buildjob in ts-build-check"):
> Current regular expression used to match the buildjob works correctly when the
> buildjob runvar has the <job_name>buildjob format, but not when the format is
> <job_name>_buildjob (the first match group is empty in this case). Change it so
> that it works for both formats.

I think I have misled you.  Looking at the database I see there are
runvars with names like this

  src_host_xenbuildjob
  guests_rumpuserxenbuildjob

Ie, the part before the _ (if any), is a scope (like a host ident).
So this patch is wrong, and also, your other patches have to use
`freebsdbuildjob'.

Sorry :-/.

Ian.
Roger Pau Monne May 24, 2017, 7:18 a.m. UTC | #2
On Tue, May 23, 2017 at 04:01:33PM +0100, Ian Jackson wrote:
> Roger Pau Monne writes ("[PATCH 3/7] osstest: fix regular expression used to match buildjob in ts-build-check"):
> > Current regular expression used to match the buildjob works correctly when the
> > buildjob runvar has the <job_name>buildjob format, but not when the format is
> > <job_name>_buildjob (the first match group is empty in this case). Change it so
> > that it works for both formats.
> 
> I think I have misled you.  Looking at the database I see there are
> runvars with names like this
> 
>   src_host_xenbuildjob
>   guests_rumpuserxenbuildjob
> 
> Ie, the part before the _ (if any), is a scope (like a host ident).
> So this patch is wrong, and also, your other patches have to use
> `freebsdbuildjob'.
> 
> Sorry :-/.

NP, it's a simple s/freebsd_buildjob/freebsdbuildjob/, now done (and this patch
dropped).

Thanks, Roger.
diff mbox

Patch

diff --git a/ts-build-check b/ts-build-check
index 92e19fb0..b9ade876 100755
--- a/ts-build-check
+++ b/ts-build-check
@@ -26,7 +26,7 @@  die if @ARGV && $ARGV[0] =~ m/^-/;
 logm("checking builds ...");
 
 foreach my $k (sort keys %r) {
-    next unless $k =~ m/^(?:.*_)?([^_]*)buildjob$/;
+    next unless $k =~ m/^(.*?)(_?)buildjob$/;
     my $part= $1;
     my $path= "path_${part}dist";
     logm("checking $k $path");