diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-11-15 15:35:28 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-11-15 15:35:28 +0000 |
commit | a8102cf3db9b741bd65a4c1b573c238d526e2c05 (patch) | |
tree | 23343139bbaaafccc6d59e0ac7cf935bf3df33ea | |
parent | 406ef8823b57416e2bf69416ec3d9b3bc17ebb69 (diff) | |
download | urpmi-a8102cf3db9b741bd65a4c1b573c238d526e2c05.tar urpmi-a8102cf3db9b741bd65a4c1b573c238d526e2c05.tar.gz urpmi-a8102cf3db9b741bd65a4c1b573c238d526e2c05.tar.bz2 urpmi-a8102cf3db9b741bd65a4c1b573c238d526e2c05.tar.xz urpmi-a8102cf3db9b741bd65a4c1b573c238d526e2c05.zip |
test "urpmi --src" and "urpmi --install-src"
-rw-r--r-- | t/superuser--srpm-bootstrapping.t | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/t/superuser--srpm-bootstrapping.t b/t/superuser--srpm-bootstrapping.t index e0182ec0..a6c21a26 100644 --- a/t/superuser--srpm-bootstrapping.t +++ b/t/superuser--srpm-bootstrapping.t @@ -10,5 +10,29 @@ need_root_and_prepare(); my $name = 'srpm-bootstrapping'; urpmi_addmedia("$name $::pwd/media/$name"); -urpmi("--auto media/SRPMS-$name/$name-*.src.rpm"); -is(`rpm -qa --root $::pwd/root`, "$name-1-1\n"); +test("media/SRPMS-$name/$name-*.src.rpm"); + +urpmi_addmedia("$name-src $::pwd/media/SRPMS-$name"); +test("--src $name"); + +sub test { + my ($para) = @_; + + urpmi("--auto $para"); + check_installed_names($name); # check the buildrequires is installed + + install_src_rpm($para); + check_installed_and_remove($name); +} + +sub install_src_rpm { + my ($para) = @_; + + system_('mkdir -p root/usr/src/rpm/SOURCES'); + + $ENV{HOME} = '/'; + urpmi("--install-src $para"); + + system_("cmp root/usr/src/rpm/SPECS/$name.spec data/SPECS/$name.spec"); + system_('rm -rf root/usr/src/rpm'); +} |