git-svn: exit with status 1 for test failures
Some versions of the SVN libraries cause die() to exit with 255,
and 40cf043389
tightened up
test_expect_failure to reject return values >128.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
0d7a6e4ef9
commit
b42a044f59
@ -21,6 +21,7 @@ $ENV{TZ} = 'UTC';
|
|||||||
$ENV{LC_ALL} = 'C';
|
$ENV{LC_ALL} = 'C';
|
||||||
$| = 1; # unbuffer STDOUT
|
$| = 1; # unbuffer STDOUT
|
||||||
|
|
||||||
|
sub fatal (@) { print STDERR $@; exit 1 }
|
||||||
# If SVN:: library support is added, please make the dependencies
|
# If SVN:: library support is added, please make the dependencies
|
||||||
# optional and preserve the capability to use the command-line client.
|
# optional and preserve the capability to use the command-line client.
|
||||||
# use eval { require SVN::... } to make it lazy load
|
# use eval { require SVN::... } to make it lazy load
|
||||||
@ -571,7 +572,7 @@ sub commit_lib {
|
|||||||
$no = 1;
|
$no = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close $fh or croak $?;
|
close $fh or exit 1;
|
||||||
if (! defined $r_new && ! defined $cmt_new) {
|
if (! defined $r_new && ! defined $cmt_new) {
|
||||||
unless ($no) {
|
unless ($no) {
|
||||||
die "Failed to parse revision information\n";
|
die "Failed to parse revision information\n";
|
||||||
@ -873,6 +874,7 @@ sub commit_diff {
|
|||||||
print "Committed $_[0]\n";
|
print "Committed $_[0]\n";
|
||||||
}, @lock)
|
}, @lock)
|
||||||
);
|
);
|
||||||
|
eval {
|
||||||
my $mods = libsvn_checkout_tree($ta, $tb, $ed);
|
my $mods = libsvn_checkout_tree($ta, $tb, $ed);
|
||||||
if (@$mods == 0) {
|
if (@$mods == 0) {
|
||||||
print "No changes\n$ta == $tb\n";
|
print "No changes\n$ta == $tb\n";
|
||||||
@ -880,6 +882,8 @@ sub commit_diff {
|
|||||||
} else {
|
} else {
|
||||||
$ed->close_edit;
|
$ed->close_edit;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
fatal "$@\n" if $@;
|
||||||
$_message = $_file = undef;
|
$_message = $_file = undef;
|
||||||
return $rev_committed;
|
return $rev_committed;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user