Skip to content

Commit

Permalink
runtests and friends: Do not add undefined values to @inc
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fabiankeil authored and bagder committed Dec 6, 2012
1 parent 3c6ea7c commit ca5f4e2
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion tests/ftpserver.pl
Expand Up @@ -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";
Expand Down
3 changes: 2 additions & 1 deletion tests/httpserver.pl
Expand Up @@ -22,7 +22,8 @@
#***************************************************************************

BEGIN {
@INC=(@INC, $ENV{'srcdir'}, '.');
push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
push(@INC, ".");
}

use strict;
Expand Down
3 changes: 2 additions & 1 deletion tests/keywords.pl
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion tests/rtspserver.pl
Expand Up @@ -22,7 +22,8 @@
#***************************************************************************

BEGIN {
@INC=(@INC, $ENV{'srcdir'}, '.');
push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
push(@INC, ".");
}

use strict;
Expand Down
3 changes: 2 additions & 1 deletion tests/runtests.pl
Expand Up @@ -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";
Expand Down
3 changes: 2 additions & 1 deletion tests/secureserver.pl
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion tests/tftpserver.pl
Expand Up @@ -22,7 +22,8 @@
#***************************************************************************

BEGIN {
@INC=(@INC, $ENV{'srcdir'}, '.');
push(@INC, $ENV{'srcdir'}) if(defined $ENV{'srcdir'});
push(@INC, ".");
}

use strict;
Expand Down

0 comments on commit ca5f4e2

Please sign in to comment.