#!/bin/sh

set -eu

TESTDIR=${AUTOPKGTEST_TMP:-}
if [ -z "${TESTDIR}" ]; then
    TESTDIR=`pwd`/debian/testhome
    trap "rm -rf ${TESTDIR}" INT TERM EXIT
fi
mkdir -p ${TESTDIR}
cp -r tests/ ${TESTDIR}/
export HOME=${TESTDIR}
export TMPDIR=${TESTDIR}
cd ${TESTDIR}
pytest-3
