summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-04-04 14:00:23 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-04-04 14:00:23 +0300
commit8e34f32f9f2c27fff9b0c793f8332f091ba5cc79 (patch)
tree18efd89ede018d463b0a13bff711b95508706c17 /tests
parentcb4da93fdfa8418b4670f38ff61ddf9357ff30e3 (diff)
downloadlibrpm-tizen-8e34f32f9f2c27fff9b0c793f8332f091ba5cc79.tar.gz
librpm-tizen-8e34f32f9f2c27fff9b0c793f8332f091ba5cc79.tar.bz2
librpm-tizen-8e34f32f9f2c27fff9b0c793f8332f091ba5cc79.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am5
-rw-r--r--tests/atlocal.in2
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f6e95103f..1e8a750a6 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 3d46a7d4b..5ce6f4f93 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"
)
}