1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Description: adjust paths when run under autopkgtest
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2023-09-02
--- a/t/20-pp.t
+++ b/t/20-pp.t
@@ -34,6 +34,7 @@
my $test_dir = catdir($cwd, 'contrib', 'automated_pp_test');
my $parl = catfile($cwd, 'blib', 'script', "parl$Config{_exe}");
+$parl = '/usr/bin/parl' if $ENV{AUTOPKGTEST_TMP};
my $orig_X = $^X;
@@ -64,9 +65,13 @@
chdir $test_dir or die "can't chdir to $test_dir: $!";
push @INC, $test_dir;
{
+ my $PP = catfile($cwd, qw(blib script pp));
+ $PP = '/usr/bin/pp' if $ENV{AUTOPKGTEST_TMP};
+ my $PAR = catfile($cwd, qw(blib script par.pl));
+ $PAR = '/usr/bin/par-archive' if $ENV{AUTOPKGTEST_TMP};
local @ARGV = (
- "--pp_location" => catfile($cwd, qw(blib script pp)),
- "--par_location" => catfile($cwd, qw(blib script par.pl)),
+ "--pp_location" => $PP,
+ "--par_location" => $PAR,
(defined($ENV{TEST_VERBOSE}) && $ENV{TEST_VERBOSE} > 1) ? ("--verbose") : ()
);
do "./automated_pp_test.pl";
--- a/t/utils.pl
+++ b/t/utils.pl
@@ -12,6 +12,7 @@
# use an absolute pathname in case a test chdir()s
my $pp = catfile(getcwd(), qw( blib script pp ));
+$pp = '/usr/bin/pp' if $ENV{AUTOPKGTEST_TMP};
my $xid = 0;
--- a/t/86-xs-par.t
+++ b/t/86-xs-par.t
@@ -10,6 +10,7 @@
# use an absolute pathname in case a test chdir()s
my $pp = catfile(getcwd(), qw( blib script pp ));
+$pp = '/usr/bin/pp' if $ENV{AUTOPKGTEST_TMP};
# runs 1 test
sub pp_p_ok
|