From 0b5f2842b8a89ada98050c1c5448d9a0438b1fde Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 15 Jan 2008 16:22:22 +0000 Subject: add run_urpm_cmd() --- t/helper.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 't/helper.pm') 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 { -- cgit v1.2.1