[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH] cs-bisection-step: Cope with url-less trees



Since osstest 64a9c064, some flights have a tree with an empty
tree_<foo> variable.  This breaks the bisector.  Make it more robust
as follows:

When searching for the basis flight, ignore not only trees with no url
specified but also ones with an empty url.

When preparing the set of trees we care about, eliminate any where the
latest flight has no url (or an empty url).

(It would still be better for the flight constructor to leave
tree_<foo> unset, and for the ts-* build script to set it in as a part
of the post-build data collection.  That would allow the bisector to
work on that tree where relevant.  But doing this is a task for
another day - if for no other reason than that we have to decide
whether to put it in a new variable built_tree_<foo>.)

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 cs-bisection-step |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/cs-bisection-step b/cs-bisection-step
index ca3b28a..3172b57 100755
--- a/cs-bisection-step
+++ b/cs-bisection-step
@@ -357,7 +357,7 @@ END
                my $failvcs = $failrmap->{$tree}{Url};
                my $basisvcs = $basisrmap->{$tree}{Url};
 #print STDERR Dumper($failvcs, $basisvcs);
-               next unless defined $basisvcs;
+               next unless defined $basisvcs && length $basisvcs;
                $failvcs  =~ s/.*(\.git|\.hg)$/$1/ or $failvcs= 'git';
                $basisvcs =~ s/.*(\.git|\.hg)$/$1/ or $basisvcs='git';
 #print STDERR "COMPARE $failvcs $basisvcs\n";
@@ -437,10 +437,15 @@ sub digraph_whole () {
 
     foreach my $tree (sort keys %$latest_rmap) {
         if (defined $basispass_rmap->{$tree}) {
-            push @treeinfos, {
-                Name => $tree,
-                Url => $latest_rmap->{$tree}{Url}
-            };
+           my $url = $latest_rmap->{$tree}{Url};
+           if (defined $url && length $url) {
+               push @treeinfos, {
+                   Name => $tree,
+                   Url => $latest_rmap->{$tree}{Url}
+               };
+           } else {
+               print STDERR "(tree with no url: $tree)\n";
+           }
         } else {
             print STDERR "(tree in latest but not in basispass: $tree)\n";
         }
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.