summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Keil <fk@fabiankeil.de>2012-11-14 11:40:31 +0100
committerDaniel Stenberg <daniel@haxx.se>2012-12-06 23:04:33 +0100
commitca5f4e21357a0b4a55e7a2a0f71e632442723989 (patch)
tree968ad0e6e642916d4b529851d8e2ae0eae1e081c
parent3c6ea7ca825f2f17baf5b384d06b824b5a45987c (diff)
downloadcurl-ca5f4e21357a0b4a55e7a2a0f71e632442723989.tar.gz
runtests and friends: Do not add undefined values to @INC
On FreeBSD this fixes the warning: Use of uninitialized value $p in string eq at /usr/local/lib/perl5/5.14.2/BSDPAN/BSDPAN.pm line 36.
-rwxr-xr-xtests/ftpserver.pl3
-rwxr-xr-xtests/httpserver.pl3
-rwxr-xr-xtests/keywords.pl3
-rwxr-xr-xtests/rtspserver.pl3
-rwxr-xr-xtests/runtests.pl3
-rwxr-xr-xtests/secureserver.pl3
-rwxr-xr-xtests/tftpserver.pl3
7 files changed, 14 insertions, 7 deletions
diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl
index 6e6f691d4..45b343635 100755
--- a/tests/ftpserver.pl
+++ b/tests/ftpserver.pl
@@ -39,7 +39,8 @@
#
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
# sub second timestamping needs Time::HiRes
eval {
no warnings "all";
diff --git a/tests/httpserver.pl b/tests/httpserver.pl
index d5c4dfb27..a38c3cebd 100755
--- a/tests/httpserver.pl
+++ b/tests/httpserver.pl
@@ -22,7 +22,8 @@
#***************************************************************************
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;
diff --git a/tests/keywords.pl b/tests/keywords.pl
index 523bde1fc..28646ad00 100755
--- a/tests/keywords.pl
+++ b/tests/keywords.pl
@@ -23,7 +23,8 @@
use strict;
-@INC=(@INC, $ENV{'srcdir'}, ".");
+push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+push(@INC, ".");
require "getpart.pm"; # array functions
diff --git a/tests/rtspserver.pl b/tests/rtspserver.pl
index 515128d7b..07a588ecd 100755
--- a/tests/rtspserver.pl
+++ b/tests/rtspserver.pl
@@ -22,7 +22,8 @@
#***************************************************************************
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 27fff4a95..0b2559ecd 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -56,7 +56,8 @@
# These should be the only variables that might be needed to get edited:
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, ".");
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
# run time statistics needs Time::HiRes
eval {
no warnings "all";
diff --git a/tests/secureserver.pl b/tests/secureserver.pl
index 064fa84f5..36a902e5a 100755
--- a/tests/secureserver.pl
+++ b/tests/secureserver.pl
@@ -26,7 +26,8 @@
# non-secure test harness servers.
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;
diff --git a/tests/tftpserver.pl b/tests/tftpserver.pl
index c5382ec66..60fc32d19 100755
--- a/tests/tftpserver.pl
+++ b/tests/tftpserver.pl
@@ -22,7 +22,8 @@
#***************************************************************************
BEGIN {
- @INC=(@INC, $ENV{'srcdir'}, '.');
+ push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
+ push(@INC, ".");
}
use strict;