diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-09-24 11:51:49 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-09-24 11:51:49 +0300 |
commit | f7c1eb5ef041b9b06cbb81dac7d7972a602cad44 (patch) | |
tree | 0cb1cd90d612c2d9def9f2fbb7348b7c375eb278 /tests | |
parent | ad3f256be3c8507473f22c92ee031d422fc712c4 (diff) | |
download | librpm-tizen-f7c1eb5ef041b9b06cbb81dac7d7972a602cad44.tar.gz librpm-tizen-f7c1eb5ef041b9b06cbb81dac7d7972a602cad44.tar.bz2 librpm-tizen-f7c1eb5ef041b9b06cbb81dac7d7972a602cad44.zip |
Test different versions in same transaction both ways
- Different versions can happen two ways: older first or older last,
test both cases
- Add verbose output for install to get the warning messages too and
require that matches as well
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rpmi.at | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/tests/rpmi.at b/tests/rpmi.at index 5ff90bc25..7e9c26cfb 100644 --- a/tests/rpmi.at +++ b/tests/rpmi.at @@ -153,22 +153,45 @@ runroot rpm -q versiontest AT_CLEANUP # Test upgrade of different versions in same transaction -AT_SETUP([rpm -U two versions of same package]) +AT_SETUP([rpm -U two versions of same package 1]) AT_CHECK([ RPMDB_CLEAR RPMDB_INIT -runroot rpm -U \ +runroot rpm -Uv \ "${TOPDIR}"/RPMS/noarch/versiontest-1.0-1.noarch.rpm \ "${TOPDIR}"/RPMS/noarch/versiontest-2.0-1.noarch.rpm runroot rpm -q versiontest ], [0], -[versiontest-2.0-1.noarch +[Preparing packages... +versiontest-2.0-1.noarch +versiontest-2.0-1.noarch ], -[]) +[warning: package versiontest-1.0-1.noarch was already added, replacing with versiontest-2.0-1.noarch +]) AT_CLEANUP +# Test upgrade of different versions in same transaction +AT_SETUP([rpm -U two versions of same package 2]) +AT_CHECK([ +RPMDB_CLEAR +RPMDB_INIT + +runroot rpm -Uv \ + "${TOPDIR}"/RPMS/noarch/versiontest-2.0-1.noarch.rpm \ + "${TOPDIR}"/RPMS/noarch/versiontest-1.0-1.noarch.rpm +runroot rpm -q versiontest +], +[0], +[Preparing packages... +versiontest-2.0-1.noarch +versiontest-2.0-1.noarch +], +[warning: package versiontest-2.0-1.noarch was already added, skipping versiontest-1.0-1.noarch +]) + +AT_CLEANUP # Test install of two different versions in same transaction AT_SETUP([rpm -i two versions of same package]) AT_CHECK([ |