From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH] cs-bisection-step: Cope with url-less trees Date: Mon, 2 Jun 2014 11:17:22 +0100 Message-ID: <1401704242-16789-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WrPJB-0002gN-Ro for xen-devel@lists.xenproject.org; Mon, 02 Jun 2014 10:17:38 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Since osstest 64a9c064, some flights have a tree with an empty tree_ 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_ 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_.) Signed-off-by: Ian Jackson --- 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