Debian Codegraph @

debian/tests/smoke-test

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