File: autopkgtest.patch

package info (click to toggle)
libpar-packer-perl 1.047-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,272 kB
  • sloc: perl: 13,276; ansic: 1,059; makefile: 32
file content (55 lines) | stat: -rw-r--r-- 1,635 bytes parent folder | download
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
53
54
55
Description: adjust paths when run under autopkgtest
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2018-04-10

--- 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{ADTTMP};
 
 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{ADTTMP};
+    my $PAR = catfile($cwd, qw(blib script par.pl));
+    $PAR = '/usr/bin/par-archive' if $ENV{ADTTMP};
     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/30-current_exec.t
+++ b/t/30-current_exec.t
@@ -21,7 +21,9 @@
 ####
 diag( "Please wait" );
 my $test_proc = catfile(qw(t test-proc));
-system $^X, catfile(qw( blib script pp )),
+my $PP = catfile(qw( blib script pp ));
+$PP = '/usr/bin/pp' if $ENV{ADTTMP};
+system $^X, $PP,
        '-o', $EXE, $test_proc;
 
 ok( (-f $EXE), "Created \"$EXE\"" ) 
--- 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{ADTTMP};
 
 # runs 1 test
 sub pp_ok