diff options
author | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-08-21 14:52:00 +0200 |
---|---|---|
committer | Ralf Corsépius <corsepiu@fedoraproject.org> | 2007-08-21 14:52:00 +0200 |
commit | ceabc3ff98313614a22022f2358f7d61c129319f (patch) | |
tree | 1889b2c193e2d95c67e8e91e4f4ae85151158339 | |
parent | 8cfc7829cb478dab8d805fb3dfcb7e2019d4fe16 (diff) | |
download | rpm-ceabc3ff98313614a22022f2358f7d61c129319f.tar.gz rpm-ceabc3ff98313614a22022f2358f7d61c129319f.tar.bz2 rpm-ceabc3ff98313614a22022f2358f7d61c129319f.zip |
Cosmetics.
-rw-r--r-- | tests/rpmdb.at | 48 | ||||
-rw-r--r-- | tests/rpmgeneral.at | 7 | ||||
-rw-r--r-- | tests/rpmi.at | 1 | ||||
-rw-r--r-- | tests/rpmquery.at | 51 | ||||
-rw-r--r-- | tests/rpmtests.at | 4 |
5 files changed, 72 insertions, 39 deletions
diff --git a/tests/rpmdb.at b/tests/rpmdb.at index 8ca9b2988..e0dea0b94 100644 --- a/tests/rpmdb.at +++ b/tests/rpmdb.at @@ -17,29 +17,22 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# ------------------------------ # Attempt to initialize a rpmdb AT_SETUP([rpm --initdb]) AT_CHECK([ -DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'` -rm -rf "${abs_builddir}"/testing"${DBPATH}"/* -rpm \ - --rcfile=${RPMRC} \ - --root="${abs_builddir}"/testing \ - --initdb], +RPM_INIT_DB +], [0], [ignore], [ignore]) AT_CLEANUP +# ------------------------------ # Run rpm -qa on an empty rpmdb AT_SETUP([rpm -qa]) AT_CHECK([ -DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'` -rm -rf "${abs_builddir}"/testing"${DBPATH}"/* -rpm \ - --rcfile=${RPMRC} \ - --root="${abs_builddir}"/testing \ - --initdb +RPM_INIT_DB rpm \ --rcfile=${RPMRC} \ --root="${abs_builddir}"/testing \ @@ -51,18 +44,13 @@ rpm \ AT_CLEANUP +# ------------------------------ # install a package into a local rpmdb without --relocate and --nodeps # * Must fail due to missing deps # * Use --ignorearch because we don't know the arch AT_SETUP([rpm -i *.i386.rpm]) AT_CHECK([ -DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'` -rm -rf "${abs_builddir}"/testing"${DBPATH}"/* - -rpm \ - --rcfile=${RPMRC} \ - --root="${abs_builddir}"/testing \ - --initdb +RPM_INIT_DB ], [0],[ignore],[ignore]) @@ -85,18 +73,13 @@ rpm -i \ AT_CLEANUP +# ------------------------------ # install a package into a local rpmdb # * Shall only work with relocation # * Use --ignorearch because we don't know the arch AT_SETUP([rpm -i --relocate=.. *.i386.rpm]) AT_CHECK([ -DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'` -rm -rf "${abs_builddir}"/testing"${DBPATH}"/* - -rpm \ - --rcfile=${RPMRC} \ - --root="${abs_builddir}"/testing \ - --initdb +RPM_INIT_DB ], [0],[ignore],[ignore]) @@ -104,7 +87,7 @@ AT_CHECK([ rpm -i \ --rcfile=${RPMRC} \ --root="${abs_builddir}"/testing \ - --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing \ + --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing/check \ "${abs_srcdir}"/data/RPMS/hello-1.0-1.i386.rpm ], [0], @@ -114,18 +97,13 @@ rpm -i \ AT_CLEANUP +# ------------------------------ # install a package into a local rpmdb # * Shall only work with relocation # * Use --ignorearch because we don't know the arch AT_SETUP([rpm -i --relocate=.. *.ppc64.rpm]) AT_CHECK([ -DBPATH=`rpm --rcfile=${RPMRC} --eval '%_dbpath'` -rm -rf "${abs_builddir}"/testing"${DBPATH}"/* - -rpm \ - --rcfile=${RPMRC} \ - --root="${abs_builddir}"/testing \ - --initdb +RPM_INIT_DB ], [0],[ignore],[ignore]) @@ -133,7 +111,7 @@ AT_CHECK([ rpm -i \ --rcfile=${RPMRC} \ --root="${abs_builddir}"/testing \ - --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing \ + --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing/check \ "${abs_srcdir}"/data/RPMS/hello-1.0-1.ppc64.rpm ], [0], diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at index 037adf6f8..7a0b924dd 100644 --- a/tests/rpmgeneral.at +++ b/tests/rpmgeneral.at @@ -16,6 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# ------------------------------ AT_SETUP([rpm --version]) AT_CHECK([rpm --version],[0], [RPM version AT_PACKAGE_VERSION @@ -23,6 +24,7 @@ AT_CHECK([rpm --version],[0], AT_CLEANUP +# ------------------------------ AT_SETUP([rpmbuild --version]) AT_CHECK([rpmbuild --version],[0], [RPM version AT_PACKAGE_VERSION @@ -30,6 +32,7 @@ AT_CHECK([rpmbuild --version],[0], AT_CLEANUP +# ------------------------------ AT_SETUP([rpmquery --version]) AT_CHECK([rpmquery --version],[0], [RPM version AT_PACKAGE_VERSION @@ -37,6 +40,7 @@ AT_CHECK([rpmquery --version],[0], AT_CLEANUP +# ------------------------------ AT_SETUP([rpmi --version]) AT_CHECK([rpmi --version],[0], [RPM version AT_PACKAGE_VERSION @@ -44,11 +48,14 @@ AT_CHECK([rpmi --version],[0], AT_CLEANUP +# ------------------------------ AT_SETUP([rpm --showrc]) AT_CHECK([rpm --rcfile=${RPMRC} --showrc],[0], [ignore]) AT_CLEANUP + +# ------------------------------ # Check rpm --querytags # * Some versions of rpm append extraneous whitespaces AT_SETUP([rpm --querytags]) diff --git a/tests/rpmi.at b/tests/rpmi.at index ac0ba50d2..d55d83fa3 100644 --- a/tests/rpmi.at +++ b/tests/rpmi.at @@ -35,6 +35,7 @@ rpmi \ [ignore]) AT_CLEANUP +# ------------------------------ # Check if rpmi -i *.src.rpm works AT_SETUP([rpmi -i *.src.rpm]) AT_CHECK([ diff --git a/tests/rpmquery.at b/tests/rpmquery.at index f00d52325..c4ecd8c87 100644 --- a/tests/rpmquery.at +++ b/tests/rpmquery.at @@ -16,6 +16,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# ------------------------------ AT_SETUP([rpmquery --qf -p *.i386.rpm]) AT_CHECK([ rpmquery \ @@ -29,6 +30,7 @@ rpmquery \ [ignore]) AT_CLEANUP +# ------------------------------ AT_SETUP([rpmquery --qf -p *.src.rpm]) AT_CHECK([ rpmquery \ @@ -42,6 +44,7 @@ rpmquery \ [ignore]) AT_CLEANUP +# ------------------------------ AT_SETUP([rpmquery -ql -p *.src.rpm]) AT_CHECK([ rpmquery \ @@ -56,6 +59,7 @@ hello.spec [ignore]) AT_CLEANUP +# ------------------------------ AT_SETUP([rpmquery -ql -p *.i386.rpm]) AT_CHECK([ rpmquery \ @@ -71,3 +75,50 @@ rpmquery \ [ignore]) AT_CLEANUP + +# ------------------------------ +# install a package into a local rpmdb +# * Shall only work with relocation +# * Use --ignorearch because we don't know the arch +AT_SETUP([rpm -qil hello]) +AT_CHECK([ +RPM_INIT_DB +], +[0],[ignore],[ignore]) + +AT_CHECK([ +rpm --rcfile=${RPMRC} \ + --root="${abs_builddir}"/testing \ + --nodeps --ignorearch --relocate=/usr="${abs_builddir}"/testing/check \ + -i "${abs_srcdir}"/data/RPMS/hello-1.0-1.ppc64.rpm +], +[0], +[ignore], +[ignore]) + +AT_CHECK([ +rpm --rcfile=${RPMRC} \ + --root="${abs_builddir}"/testing \ + -q hello +], +[0], +[hello-1.0-1.ppc64 +], +[ignore]) + +cat > expout << _ATEOF +${abs_builddir}/testing/check/local/bin/hello +${abs_builddir}/testing/check/share/doc/hello-1.0 +${abs_builddir}/testing/check/share/doc/hello-1.0/FAQ +_ATEOF + +AT_CHECK([ +rpm --rcfile=${RPMRC} \ + --root="${abs_builddir}"/testing \ + -ql hello +], +[0], +[expout], +[ignore]) + +AT_CLEANUP diff --git a/tests/rpmtests.at b/tests/rpmtests.at index 74dceb9d8..43a57f903 100644 --- a/tests/rpmtests.at +++ b/tests/rpmtests.at @@ -1,7 +1,3 @@ -AT_INIT - -AT_TESTED(rpm rpmbuild rpmquery) - m4_include([rpmgeneral.at]) m4_include([rpmquery.at]) m4_include([rpmdb.at]) |