File: autopkgtest-path.patch

package info (click to toggle)
perlbrew 1.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 752 kB
  • sloc: perl: 9,387; makefile: 7; sh: 1
file content (28 lines) | stat: -rw-r--r-- 863 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
Description: use installed script when run under autopkgtest
Origin: vendor
Forwarded: not-needed
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2024-09-25

--- a/t/09.exit_status.t
+++ b/t/09.exit_status.t
@@ -8,7 +8,7 @@
 
 use Path::Class;
 
-my $bin_perlbrew = file(__FILE__)->dirname->dirname->child("script")->child("perlbrew");
+my $bin_perlbrew = $ENV{AUTOPKGTEST_TMP} ? '/usr/bin/perlbrew' : file(__FILE__)->dirname->dirname->child("script")->child("perlbrew");
 
 like(
     dies {
--- a/t/command-help.t
+++ b/t/command-help.t
@@ -5,7 +5,7 @@
 use App::perlbrew;
 require "test2_helpers.pl";
 
-my $bin_perlbrew = file(__FILE__)->dirname->dirname->child("script")->child("perlbrew");
+my $bin_perlbrew = $ENV{AUTOPKGTEST_TMP} ? '/usr/bin/perlbrew' : file(__FILE__)->dirname->dirname->child("script")->child("perlbrew");
 my $perl = $^X;
 
 #