diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-05-26 13:49:38 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-05-26 14:18:09 +0300 |
commit | b40fe69c3b15d24f1c18a5a2b9805e2d8ac27870 (patch) | |
tree | fbf2f06770886f7502a90e79823378bef9a1f091 /tests | |
parent | 75a0d6dcf4a571ddea3857e9e24e3fecc136defd (diff) | |
download | rpm-b40fe69c3b15d24f1c18a5a2b9805e2d8ac27870.tar.gz rpm-b40fe69c3b15d24f1c18a5a2b9805e2d8ac27870.tar.bz2 rpm-b40fe69c3b15d24f1c18a5a2b9805e2d8ac27870.zip |
Add two basic multilib conflict resolution tests
- Add colored binary packages (as there's no guarantee we can build
them from test-suite), test that colored conflicts get resolved
to preferred color.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/data/RPMS/hello-2.0-1.i686.rpm | bin | 0 -> 4376 bytes | |||
-rw-r--r-- | tests/data/RPMS/hello-2.0-1.x86_64.rpm | bin | 0 -> 4356 bytes | |||
-rw-r--r-- | tests/rpmconflict.at | 39 |
4 files changed, 41 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 1e8a750a6..17f1e0f28 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -45,6 +45,8 @@ EXTRA_DIST += data/SOURCES/hello-2.0.tar.gz EXTRA_DIST += data/RPMS/foo-1.0-1.noarch.rpm EXTRA_DIST += data/RPMS/hello-1.0-1.i386.rpm EXTRA_DIST += data/RPMS/hello-1.0-1.ppc64.rpm +EXTRA_DIST += data/RPMS/hello-2.0-1.i686.rpm +EXTRA_DIST += data/RPMS/hello-2.0-1.x86_64.rpm EXTRA_DIST += data/SRPMS/foo-1.0-1.src.rpm EXTRA_DIST += data/SRPMS/hello-1.0-1.src.rpm diff --git a/tests/data/RPMS/hello-2.0-1.i686.rpm b/tests/data/RPMS/hello-2.0-1.i686.rpm Binary files differnew file mode 100644 index 000000000..ae2df2541 --- /dev/null +++ b/tests/data/RPMS/hello-2.0-1.i686.rpm diff --git a/tests/data/RPMS/hello-2.0-1.x86_64.rpm b/tests/data/RPMS/hello-2.0-1.x86_64.rpm Binary files differnew file mode 100644 index 000000000..5a3557229 --- /dev/null +++ b/tests/data/RPMS/hello-2.0-1.x86_64.rpm diff --git a/tests/rpmconflict.at b/tests/rpmconflict.at index 89b685741..2dc12e3bc 100644 --- a/tests/rpmconflict.at +++ b/tests/rpmconflict.at @@ -84,6 +84,45 @@ runroot rpm -U \ [ignore]) AT_CLEANUP +# ------------------------------ +# File conflict between colored files, prefer 64bit +AT_SETUP([rpm -U multilib elf conflict, prefer 64bit]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_CLEAR +RPMDB_INIT + +runroot rpm -U --ignoreos --ignorearch --nodeps \ + --define "_transaction_color 3" \ + --define "_prefer_color 2" \ + /data/RPMS/hello-2.0-1.i686.rpm \ + /data/RPMS/hello-2.0-1.x86_64.rpm +runroot rpm -q --qf "[[%{filestates:fstate} ]]" hello.i686 hello.x86_64 +], +[0], +[wrong color normal normal normal normal normal normal normal normal normal ], +[]) +AT_CLEANUP + +# ------------------------------ +# File conflict between colored files, prefer 32bit +AT_SETUP([rpm -U multilib elf conflict, prefer 32bit]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_CLEAR +RPMDB_INIT + +runroot rpm -U --ignoreos --ignorearch --nodeps \ + --define "_transaction_color 3" \ + --define "_prefer_color 1" \ + /data/RPMS/hello-2.0-1.i686.rpm \ + /data/RPMS/hello-2.0-1.x86_64.rpm +runroot rpm -q --qf "[[%{filestates:fstate} ]]" hello.i686 hello.x86_64 +], +[0], +[normal normal normal normal normal wrong color normal normal normal normal ], +[]) +AT_CLEANUP # ------------------------------ # Replace directory with symlink, this is expected to fail |