From: Panu Matilainen Date: Mon, 4 Apr 2011 09:01:43 +0000 (+0300) Subject: Prepare the test root entirely from Makefile, add missing bits X-Git-Tag: tznext/4.11.0.1.tizen20130304~1222 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=086791164a31c3533b1dc4f145e87a7f7e81ca09;p=tools%2Flibrpm-tizen.git Prepare the test root entirely from Makefile, add missing bits - Running builds in fakechroot needs a whole lot of things.. add symlinks to various system config + dev files to give some trivial packages a chance to build under fakechroot --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 6255732..f6e9510 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -86,7 +86,10 @@ testing$(bindir)/rpmbuild: ../rpmbuild (cd ${top_builddir} && \ $(MAKE) DESTDIR=`pwd`/${subdir}/testing install) cp -r data/ testing/ - for prog in gzip cat patch tar sh chmod; do p=`which $${prog}`; ln -s $${p} testing/$${p}; done + mkdir testing/{dev,etc} + 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 check_DATA = atconfig atlocal $(TESTSUITE) check_DATA += testing$(bindir)/rpmbuild diff --git a/tests/atlocal.in b/tests/atlocal.in index fecd950..3d46a7d 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -30,7 +30,6 @@ function run() function runroot() { (cd ${RPMTEST} && \ - mkdir -p etc && touch etc/mtab && - FAKECHROOT_BASE="${RPMTEST}" fakechroot "$@" --define "_topdir ${TOPDIR}" + FAKECHROOT_BASE="${RPMTEST}" fakechroot "$@" --define "_topdir /build" ) }