File: autopkgtest.patch

package info (click to toggle)
libpar-packer-perl 1.064-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,388 kB
  • sloc: perl: 12,774; ansic: 1,474; makefile: 30; sh: 5
file content (52 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download | duplicates (2)
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