aboutsummaryrefslogtreecommitdiff
path: root/tests/testcurl.pl
diff options
context:
space:
mode:
authorGunter Knauf <gk@gknw.de>2008-03-20 16:10:54 +0000
committerGunter Knauf <gk@gknw.de>2008-03-20 16:10:54 +0000
commitc0a30b04c267bf553e5337e8db8cf76ab2bc20e9 (patch)
tree12c8c17004801c2173bdecf933fbdefe096f4415 /tests/testcurl.pl
parent86cbb23282bee426439fc969d09a462acac0abe9 (diff)
added --extvercmd parameter which can be used to specify an external command to display 'curl --version', f.e. with MinW32 crosscompile --extvercmd=/usr/bin/wine can be used.
Diffstat (limited to 'tests/testcurl.pl')
-rwxr-xr-xtests/testcurl.pl22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/testcurl.pl b/tests/testcurl.pl
index e726478e1..2c0d547e5 100755
--- a/tests/testcurl.pl
+++ b/tests/testcurl.pl
@@ -6,7 +6,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -43,6 +43,7 @@
# --crosscompile This is a crosscompile
# --desc=[desc] Description of your test system
# --email=[email] Set email address to report as
+# --extvercmd=[command] Command to use for displaying version with cross compiles.
# --mktarball=[command] Command to run after completed test
# --name=[name] Set name to report as
# --nocvsup Don't update from CVS even though it is a CVS tree
@@ -65,7 +66,7 @@ use vars qw($version $fixed $infixed $CURLDIR $CVS $pwd $build $buildlog
$buildlogname $configurebuild $targetos $confsuffix $binext
$libext);
use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
- $nocvsup $nobuildconf $crosscompile $timestamp);
+ $extvercmd $nocvsup $nobuildconf $crosscompile $timestamp);
# version of this script
$version='$Revision$';
@@ -83,6 +84,9 @@ while ($ARGV[0]) {
elsif ($ARGV[0] =~ /--setup=/) {
$setupfile = (split(/=/, shift @ARGV))[1];
}
+ elsif ($ARGV[0] =~ /--extvercmd=/) {
+ $extvercmd = (split(/=/, shift @ARGV))[1];
+ }
elsif ($ARGV[0] =~ /--mktarball=/) {
$mktarball = (split(/=/, shift @ARGV))[1];
}
@@ -578,14 +582,10 @@ else {
mydie "curl was not created (curl$binext)";
}
-if ($targetos =~ /netware/) {
- if (-f '../../curlver') {
- system('../../curlver');
- }
-}
-elsif(!$crosscompile) {
- logit "display curl$binext --version output";
- open(F, "./src/curl$binext --version|");
+if (!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
+ logit "display curl${binext} --version output";
+ my $cmd = ($extvercmd ne '' ? $extvercmd.' ' : '')."./src/curl${binext} --version|";
+ open(F, $cmd);
while(<F>) {
print;
print LOG;
@@ -629,7 +629,7 @@ if ($configurebuild && !$crosscompile) {
}
# create a tarball if we got that option.
-if (($mktarball ne '') && (-f $mktarball)) {
+if (($mktarball ne '') && (-x $mktarball)) {
system($mktarball);
}