From: Panu Matilainen Date: Mon, 4 Apr 2011 11:00:23 +0000 (+0300) Subject: Add more stuff to test-suite root environment X-Git-Tag: tznext/4.11.0.1.tizen20130304~1219 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8e34f32f9f2c27fff9b0c793f8332f091ba5cc79;p=tools%2Flibrpm-tizen.git Add more stuff to test-suite root environment - Build needs a whole bunch of utilities there, including file + its magic database. The exact location of the magic db varies between systems but file -C lets us basically make a copy of the system magicdb into the fakechroot env and then we can override the location with MAGIC --- diff --git a/tests/Makefile.am b/tests/Makefile.am index f6e9510..1e8a750 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -86,10 +86,11 @@ testing$(bindir)/rpmbuild: ../rpmbuild (cd ${top_builddir} && \ $(MAKE) DESTDIR=`pwd`/${subdir}/testing install) cp -r data/ testing/ - mkdir testing/{dev,etc} + mkdir testing/{dev,etc,magic,tmp} for node in stdin stderr stdout null; do ln -s /dev/$${node} testing/dev/$${node}; done for cf in hosts resolv.conf passwd shadow group gshadow mtab fstab; do [ -f /etc/$${cf} ] && ln -s /etc/$${cf} testing/etc/$${cf}; done - for prog in gzip cat patch tar sh chmod rm mkdir; do p=`which $${prog}`; ln -s $${p} testing/$${p}; done + for prog in gzip cat patch tar sh ln chmod rm mkdir uname grep sed find file mktemp cut sort diff; do p=`which $${prog}`; ln -s $${p} testing/$${p}; done + (cd testing/magic && file -C) check_DATA = atconfig atlocal $(TESTSUITE) check_DATA += testing$(bindir)/rpmbuild diff --git a/tests/atlocal.in b/tests/atlocal.in index 3d46a7d..5ce6f4f 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -30,6 +30,6 @@ function run() function runroot() { (cd ${RPMTEST} && \ - FAKECHROOT_BASE="${RPMTEST}" fakechroot "$@" --define "_topdir /build" + MAGIC="/magic/magic" FAKECHROOT_BASE="${RPMTEST}" fakechroot "$@" --define "_topdir /build" ) }