1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/sh
set -e
TEMP=${AUTOPKGTEST_TMP:-${TMPDIR:-/tmp}}
TDIR=$(mktemp -d $TEMP/smokeXXXXXX)
TESTRUNNER='testrunner.sh'
export TERM=xterm-color
export LC_ALL=C.UTF-8
# create temporary directory
mkdir -p ${TDIR}
# copy testfiles
cp -a test ${TDIR}
# create fake (empty) out directory which is expected by
# the testrunner.sh script
mkdir -p ${TDIR}/out
# copy installed /etc/boxes/boxes-config and use it in
# tests
cp -a /etc/boxes/boxes-config ${TDIR}
# change directory to temporary test directory
cd ${TDIR}/test
# replace variables for binary and config to
# actually test the installed boxes binary
sed -i -e 's|boxesBinary=${OUT_DIR}/boxes$|boxesBinary=/usr/bin/boxes|g' ${TESTRUNNER}
# run the testrunner
./${TESTRUNNER} --suite
|