summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-04-17 08:25:26 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-04-17 08:25:26 +0300
commitbad173ef169905c7411f08208cf881be173d51dd (patch)
tree7c60a4a799b0af653cdc89010d1ed4fbc55d0819 /tests
parentf5fdd5f9ca68d436ebb656299c1e1ba4488b2af9 (diff)
downloadrpm-bad173ef169905c7411f08208cf881be173d51dd.tar.gz
rpm-bad173ef169905c7411f08208cf881be173d51dd.tar.bz2
rpm-bad173ef169905c7411f08208cf881be173d51dd.zip
Use a bit more complicated test for the install/remove file verification
- Previous test only used a single file and no package-specific directories, now we have multiple files and multiple directories, some owned by the package and some not. - This test fails right now due to previously unnoticed regression in commit 1845c1d711b88723e596c88e8a7730a360029089
Diffstat (limited to 'tests')
-rw-r--r--tests/rpmdb.at37
1 files changed, 16 insertions, 21 deletions
diff --git a/tests/rpmdb.at b/tests/rpmdb.at
index 461bd9cc5..3d1ff07f1 100644
--- a/tests/rpmdb.at
+++ b/tests/rpmdb.at
@@ -218,41 +218,36 @@ AT_CHECK([
RPMDB_CLEAR
RPMDB_INIT
rm -rf "${TOPDIR}"
-rm -f "${RPMTEST}"/usr/share/my.version
+rm -rf "${RPMTEST}"/opt/mydir
-runroot rpmbuild --quiet -bb \
- --define "pkg status" \
- --define "filedata same_stuff" \
- /data/SPECS/conflicttest.spec
-
-runroot rpm -U "${TOPDIR}"/RPMS/noarch/conflictstatus-1.0-1.noarch.rpm
-test -f "${RPMTEST}"/usr/share/my.version
+runroot rpmbuild --quiet -bb /data/SPECS/selfconflict.spec
+runroot rpm -U "${TOPDIR}"/RPMS/noarch/selfconflict-1.0-1.noarch.rpm
+find "${RPMTEST}"/opt | wc -l
],
[0],
-[],
+[6
+],
[])
AT_CLEANUP
# ------------------------------
-# Install, erase and verify files removed from disk
+# Install, erase and oerify files removed from disk
+# Note /opt is not owned by the pkg so it gets left behind
AT_SETUP([rpm -e and verify files removed])
AT_KEYWORDS([install rpmdb])
AT_CHECK([
RPMDB_CLEAR
RPMDB_INIT
rm -rf "${TOPDIR}"
-rm -f "${RPMTEST}"/usr/share/my.version
-
-runroot rpmbuild --quiet -bb \
- --define "pkg status" \
- --define "filedata same_stuff" \
- /data/SPECS/conflicttest.spec
+rm -rf "${RPMTEST}"/opt/mydir
-runroot rpm -U "${TOPDIR}"/RPMS/noarch/conflictstatus-1.0-1.noarch.rpm
-runroot rpm -e conflictstatus
-test -f "${RPMTEST}"/usr/share/my.version
+runroot rpmbuild --quiet -bb /data/SPECS/selfconflict.spec
+runroot rpm -U "${TOPDIR}"/RPMS/noarch/selfconflict-1.0-1.noarch.rpm
+runroot rpm -e selfconflict
+find "${RPMTEST}"/opt | wc -l
+],
+[0],
+[1
],
-[1],
-[],
[])
AT_CLEANUP