diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-08-07 10:21:36 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-10-03 10:13:18 +0300 |
commit | 09cafec1a4e16d954d1bad239581376b2cd2f4dc (patch) | |
tree | 3d3599cba19861b2f65587a1e68d0288f879aa58 | |
parent | e534be1be760c73b17596a1816c26dc63b83a25d (diff) | |
download | rpm-09cafec1a4e16d954d1bad239581376b2cd2f4dc.tar.gz rpm-09cafec1a4e16d954d1bad239581376b2cd2f4dc.tar.bz2 rpm-09cafec1a4e16d954d1bad239581376b2cd2f4dc.zip |
Add tests for invalid --relocate detection and --badreloc functionality
(cherry picked from commit 72621fcf32a6fa4fdda16f6b6729e7c6fe0943ea)
-rw-r--r-- | tests/rpmi.at | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/rpmi.at b/tests/rpmi.at index 71c2bef9a..5ff90bc25 100644 --- a/tests/rpmi.at +++ b/tests/rpmi.at @@ -206,3 +206,36 @@ runroot rpm -q versiontest AT_CLEANUP # TODO: the same with epoch vs no epoch + +AT_SETUP([rpm -U with invalid --relocate]) +AT_KEYWORDS([install relocate]) +AT_CHECK([ +RPMDB_CLEAR +RPMDB_INIT + +runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec + +runroot rpm -U --test --ignoreos --relocate /usr=/opt \ + "${TOPDIR}"/RPMS/noarch/hello-script-1.0-1.noarch.rpm +], +[1], +[], +[ path /usr in package hello-script-1.0-1.noarch is not relocatable +]) +AT_CLEANUP + +AT_SETUP([rpm -U --badreloc with invalid --relocate]) +AT_KEYWORDS([install relocate]) +AT_CHECK([ +RPMDB_CLEAR +RPMDB_INIT + +runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec + +runroot rpm -U --test --ignoreos --badreloc --relocate /usr=/opt \ + "${TOPDIR}"/RPMS/noarch/hello-script-1.0-1.noarch.rpm +], +[0], +[], +[]) +AT_CLEANUP |