aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-11-25 10:36:47 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-11-25 10:36:47 +0100
commitc1e8744177c78b150c78d376ecb1f9aa0a7cfb08 (patch)
tree66eab6ef5cc872cc14790a17673cbed351d99568
parent700843d69fd02e947e8a8d0acdf0b2ce894de57b (diff)
testcurl: skip reading the setup file if given enough cmdline info
This makes it much easier to run multiple tests in the same directory, just altering the command lines used.
-rwxr-xr-xtests/testcurl.pl11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index e814cd599..26af79366 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -258,7 +258,13 @@ sub get_host_triplet {
return $triplet;
}
-if (open(F, "$setupfile")) {
+if($name && $email && $desc) {
+ # having these fields set are enough to continue, skip reading the setup
+ # file
+ $infixed=4;
+ $fixed=4;
+}
+elsif (open(F, "$setupfile")) {
while (<F>) {
if (/(\w+)=(.*)/) {
eval "\$$1=$2;";
@@ -266,7 +272,8 @@ if (open(F, "$setupfile")) {
}
close(F);
$infixed=$fixed;
-} else {
+}
+else {
$infixed=0; # so that "additional args to configure" works properly first time...
}