summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/helper.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/t/helper.pm b/t/helper.pm
index 7c8d29b6..10449300 100644
--- a/t/helper.pm
+++ b/t/helper.pm
@@ -5,7 +5,7 @@ use base 'Exporter';
our @EXPORT = qw(need_root_and_prepare
start_httpd httpd_port
urpmi_addmedia urpmi_removemedia
- urpmi urpme
+ urpmi_cmd urpmi urpme
system_
);
@@ -29,7 +29,6 @@ sub httpd_port { 6969 }
sub start_httpd() {
$server_pid = fork();
if ($server_pid == 0) {
- mkdir 'tmp';
exec './simple-httpd', $pwd, "$pwd/tmp", httpd_port();
exit 1;
}
@@ -38,6 +37,7 @@ sub start_httpd() {
chdir 't' if -d 't';
+mkdir 'tmp';
chomp($::pwd = `pwd`);
my $urpmi_debug_opt = '-q';
#$urpmi_debug_opt = '-v --debug';
@@ -50,9 +50,12 @@ sub urpmi_removemedia {
my ($para) = @_;
system_("perl -I.. ../urpmi.removemedia $urpmi_debug_opt --urpmi-root $::pwd/root $para");
}
+sub urpmi_cmd() {
+ "perl -I.. ../urpmi $urpmi_debug_opt --urpmi-root $::pwd/root --ignoresize";
+}
sub urpmi {
my ($para) = @_;
- system_("perl -I.. ../urpmi $urpmi_debug_opt --urpmi-root $::pwd/root --ignoresize $para");
+ system_(urpmi_cmd() . " $para");
}
sub urpme {
my ($para) = @_;