xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: [OSSTEST PATCH] cs-bisection-step: Cope with url-less trees
Date: Mon, 2 Jun 2014 11:17:22 +0100	[thread overview]
Message-ID: <1401704242-16789-1-git-send-email-ian.jackson@eu.citrix.com> (raw)

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@eu.citrix.com>
---
 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

                 reply	other threads:[~2014-06-02 10:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401704242-16789-1-git-send-email-ian.jackson@eu.citrix.com \
    --to=ian.jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).