From b40fe69c3b15d24f1c18a5a2b9805e2d8ac27870 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 26 May 2011 13:49:38 +0300 Subject: 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. --- tests/Makefile.am | 2 ++ tests/data/RPMS/hello-2.0-1.i686.rpm | Bin 0 -> 4376 bytes tests/data/RPMS/hello-2.0-1.x86_64.rpm | Bin 0 -> 4356 bytes tests/rpmconflict.at | 39 +++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 tests/data/RPMS/hello-2.0-1.i686.rpm create mode 100644 tests/data/RPMS/hello-2.0-1.x86_64.rpm (limited to 'tests') 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 new file mode 100644 index 000000000..ae2df2541 Binary files /dev/null and b/tests/data/RPMS/hello-2.0-1.i686.rpm differ diff --git a/tests/data/RPMS/hello-2.0-1.x86_64.rpm b/tests/data/RPMS/hello-2.0-1.x86_64.rpm new file mode 100644 index 000000000..5a3557229 Binary files /dev/null and b/tests/data/RPMS/hello-2.0-1.x86_64.rpm differ 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 -- cgit v1.2.3