File: smoke-test

package info (click to toggle)
boxes 2.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,800 kB
  • sloc: ansic: 10,566; lex: 517; sh: 503; makefile: 309; yacc: 272; lisp: 78
file content (32 lines) | stat: -rw-r--r-- 746 bytes parent folder | download
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