[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 2/3] sg-check-tested: support --git-ancestor-of
This will be used for the linux-next branch, whose baseline is the most recently tested linux-linus which is an ancestor of the being-tested linux-next. We do not provide this for any VCS other than git. Hopefully we will never need to. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- sg-check-tested | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sg-check-tested b/sg-check-tested index 9e78448..8cdc8a9 100755 --- a/sg-check-tested +++ b/sg-check-tested @@ -20,10 +20,13 @@ use strict; use DBI; use Osstest; +use IO::Handle; our @conds; our @conds_vars; our $prrev; +our $ancestorof; +our %ancestors; open DEBUG, ">/dev/null" or die $!; @@ -84,6 +87,16 @@ END } elsif (m/^--print-revision=(.*)$/) { die if $prrev; $prrev= $1; + } elsif (m/^--git-ancestor-of=(.*)$/) { + # set GIT_DIR appropriately when using this + $ancestorof=$1; + open GA, "git rev-list $ancestorof |" or die $!; + while (<GA>) { + chomp or die; + $ancestors{$_} = 1; + } + GA->error and die $!; + $!=$?=0; close GA or die "$? $!"; } elsif (m/^--debug$/) { open DEBUG, ">&2" or die $!; } else { @@ -93,6 +106,7 @@ END die if @ARGV; die unless @conds; +die if defined($ancestorof) && !$prrev; csreadconfig(); @@ -162,6 +176,12 @@ END print DEBUG "also $val2\n"; next FLIGHT; } + if (defined $ancestorof) { + if (!$ancestors{$val1}) { + print DEBUG "not an ancestor of $ancestorof\n"; + next FLIGHT; + } + } print "$val1\n"; exit 0; } -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |