aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-08-11 00:15:20 +0000
committerYang Tse <yangsita@gmail.com>2008-08-11 00:15:20 +0000
commit3a1d28379a8a9c5ab7bf621c0d80d2ffeb0733ef (patch)
tree6f7a242b16cd19a1a28cecc089dd40cbf2f036b8
parentc57285d199aac733081bb6faea1ca647353e9747 (diff)
Die when curlbuild.h is not created or available
-rwxr-xr-xtests/testcurl.pl16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index 6342e8ac5..a008c32be 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -501,12 +501,18 @@ if ($configurebuild) {
}
}
-logit "display include/curl/curlbuild.h";
-if(open(F, "include/curl/curlbuild.h")) {
- while (<F>) {
- print if (($1 =~ /^ *#define/) && ($1 !~ /^ *#define.*__CURL_CURLBUILD_H/));
+if(-f "./include/curl/curlbuild.h") {
+ logit "display include/curl/curlbuild.h";
+ if(open(F, "<./include/curl/curlbuild.h")) {
+ while(<F>) {
+ my $ll = $_;
+ print $ll if(($ll =~ /^ *# *define/) && ($ll !~ /__CURL_CURLBUILD_H/));
+ }
+ close(F);
}
- close(F);
+}
+else {
+ mydie "no curlbuild.h created/found";
}
logit "display lib/config$confsuffix.h";