summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-28 20:40:01 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-28 20:58:59 +0200
commitcec1692c8efb7afdbde9f21e90ca2fc681eccc29 (patch)
treef5d4c5c0e32aa0d27a03e885d3edf7ef9b7a32ba /t
parenta994197786a6510b2abed1865d1a44d368418109 (diff)
downloadurpmi-cec1692c8efb7afdbde9f21e90ca2fc681eccc29.tar
urpmi-cec1692c8efb7afdbde9f21e90ca2fc681eccc29.tar.gz
urpmi-cec1692c8efb7afdbde9f21e90ca2fc681eccc29.tar.bz2
urpmi-cec1692c8efb7afdbde9f21e90ca2fc681eccc29.tar.xz
urpmi-cec1692c8efb7afdbde9f21e90ca2fc681eccc29.zip
split set_path()
Diffstat (limited to 't')
-rw-r--r--t/02create_pkgs.t3
-rw-r--r--t/helper.pm7
2 files changed, 7 insertions, 3 deletions
diff --git a/t/02create_pkgs.t b/t/02create_pkgs.t
index c0af4f3f..9733436c 100644
--- a/t/02create_pkgs.t
+++ b/t/02create_pkgs.t
@@ -6,8 +6,7 @@ use helper;
use Test::More 'no_plan';
use Cwd;
-# help CPAN testers who installed genhdlist2 using cpan but do not have /usr/local/bin in their PATH:
-$ENV{PATH} .= ":/usr/local/bin";
+set_path();
chdir 't' if -d 't';
system('rm -rf tmp media');
diff --git a/t/helper.pm b/t/helper.pm
index 947cdeaa..451311d9 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -10,11 +10,16 @@ our @EXPORT = qw(need_root_and_prepare need_downloader
urpmi_addmedia urpmi_removemedia urpmi_update
urpm_cmd run_urpm_cmd urpmi_cmd urpmi urpmi_partial test_urpmi_fail urpme
urpmi_cfg set_urpmi_cfg_global_options
- system_ system_should_fail
+ set_path system_ system_should_fail
check_installed_fullnames check_installed_names check_nothing_installed
check_installed_and_remove check_installed_fullnames_and_remove check_installed_and_urpme
);
+sub set_path() {
+ # help CPAN testers who installed genhdlist2 using cpan but do not have /usr/local/bin in their PATH:
+ $ENV{PATH} .= ":/usr/local/bin";
+}
+
my $using_root;
sub need_root_and_prepare() {
if ($< != 0) {