]> sjero.net Git - wget/blobdiff - tests/run-px
Allow proxied-https-auth test to function when building outside of source dir.
[wget] / tests / run-px
index ef38418c510cecb0823b66892df086263fdffd36..33e4c60075f7b1c3a4a3a32e8ee88beedf6822a1 100755 (executable)
@@ -1,8 +1,8 @@
 #!/usr/bin/env perl
 
 use 5.006;
-use warnings;
 use strict;
+use warnings;
 
 use Term::ANSIColor ':constants';
 $Term::ANSIColor::AUTORESET = 1;
@@ -55,14 +55,22 @@ my @tests = (
     'Test--spider-r.px',
 );
 
+foreach my $var (qw(SYSTEM_WGETRC WGETRC)) {
+    $ENV{$var} = '/dev/null';
+}
+
 my @tested;
 
 foreach my $test (@tests) {
     print "Running $test\n\n";
-    system("$^X $top_srcdir/tests/$test");
+    system("$^X -I$top_srcdir/tests $top_srcdir/tests/$test $top_srcdir");
     push @tested, { name => $test, result => $? };
 }
 
+foreach my $var (qw(SYSTEM_WGETRC WGETRC)) {
+    delete $ENV{$var};
+}
+
 print "\n";
 foreach my $test (@tested) {
     ($test->{result} == 0)