diff options
-rw-r--r-- | t/02create_pkgs.t | 3 | ||||
-rw-r--r-- | t/helper.pm | 7 |
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) { |