aboutsummaryrefslogtreecommitdiff
path: root/tests/testcurl.pl
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-03-27 18:57:24 +0100
committerDaniel Stenberg <daniel@haxx.se>2010-03-27 18:57:24 +0100
commitd4fbf2c3f086d7aca7f8d759d09110545625349e (patch)
tree5153320babddc341f6581e1a83b88ca979c812cc /tests/testcurl.pl
parent2b0c2ac49c25435f4e29a952d1ffddf5c0e87c69 (diff)
make sure git pull is actually done!
Diffstat (limited to 'tests/testcurl.pl')
-rwxr-xr-xtests/testcurl.pl24
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index 6d9d694ca..b48c2842e 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -371,32 +371,30 @@ if (-d $build) {
# get in the curl source tree root
chdir $CURLDIR;
-# Do the git thing, or not...
-if ($git) {
-
- my $cvsstat;
-
- sub gitpull() {
+sub gitpull() {
# update quietly to the latest git
if($nogitpull) {
logit "Skipping git pull (--nogitpull)";
return 1;
}
else {
-
logit "run git pull";
system("git pull 2>&1");
}
- $cvsstat=$?;
+ my $stat=$?;
- # return !RETURNVALUE so that errors return 0 while goodness
- # returns 1
- return !$cvsstat;
- }
+ return $stat;
+}
+
+# Do the git thing, or not...
+if ($git) {
+
+ my $cvsstat = gitpull();
if ($cvsstat != 0) {
- mydie "failed to update from git ($cvsstat), exiting";
+ # update failure is not lethal
+ logit "failed to update from git ($cvsstat), continue anyway";
}
elsif (!$nogitpull) {
# Set timestamp to the UTC the git update took place.