Add more stuff to test-suite root environment
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 4 Apr 2011 11:00:23 +0000 (14:00 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 4 Apr 2011 11:00:23 +0000 (14:00 +0300)
- 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

tests/Makefile.am
tests/atlocal.in

index f6e9510..1e8a750 100644 (file)
@@ -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
index 3d46a7d..5ce6f4f 100644 (file)
@@ -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"
     )
 }