#!/bin/sh -e

for d in tmp home/runtime home/data/trash; do
    mkdir -p $AUTOPKGTEST_TMP/$d
done

# try and ensure files are on the same device, since otherwise
# deletion-related tests fail attempting a cross-device rename
# by default, debci seems to place /tmp and $AUTOPKGTEST_TMP on
# different devices
export HOME=$AUTOPKGTEST_TMP/home
export XDG_RUNTIME_DIR=$AUTOPKGTEST_TMP/home/runtime
export XDG_DATA_HOME=$AUTOPKGTEST_TMP/home/data
export TMPDIR=$AUTOPKGTEST_TMP/tmp
export NOSE_IGNORE_CONFIG_FILES=1

chmod 0700 $XDG_RUNTIME_DIR

python3 -m pytest --ignore=notebook/tests/selenium
