diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-01-15 16:22:22 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-01-15 16:22:22 +0000 |
commit | 0b5f2842b8a89ada98050c1c5448d9a0438b1fde (patch) | |
tree | fdef9e7831103a1829cf42f00fd097d40d6a49b4 /t/helper.pm | |
parent | c943a108fbe924c0b96bd7a4e8fbfbb2c4387b9f (diff) | |
download | urpmi-0b5f2842b8a89ada98050c1c5448d9a0438b1fde.tar urpmi-0b5f2842b8a89ada98050c1c5448d9a0438b1fde.tar.gz urpmi-0b5f2842b8a89ada98050c1c5448d9a0438b1fde.tar.bz2 urpmi-0b5f2842b8a89ada98050c1c5448d9a0438b1fde.tar.xz urpmi-0b5f2842b8a89ada98050c1c5448d9a0438b1fde.zip |
add run_urpm_cmd()
Diffstat (limited to 't/helper.pm')
-rw-r--r-- | t/helper.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/helper.pm b/t/helper.pm index 58c1e8c4..56005df1 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_update - urpm_cmd urpmi_cmd urpmi test_urpmi_fail urpme + urpm_cmd run_urpm_cmd urpmi_cmd urpmi test_urpmi_fail urpme urpmi_cfg set_urpmi_cfg_global_options system_ system_should_fail rpm_is_jbj_version @@ -53,6 +53,12 @@ sub urpm_cmd { $o_perl_para ||= ''; "perl $o_perl_para -I.. ../$prog --urpmi-root $::pwd/root"; } +sub run_urpm_cmd { + my ($prog, $o_perl_para) = @_; + my $cmd = urpm_cmd($prog, $o_perl_para); + warn "# $cmd\n"; + `$cmd`; +} sub urpmi_cmd() { urpm_cmd('urpmi') } sub urpmi_addmedia { |