#!/bin/sh

# By default, numpy will use /tmp as the root path for temporary files used
# during tests, but if this is a tmpfs it may fill up quickly and cause many of
# the tests to report "no space left on device" errors. Create a custom
# directory for these and point pytest at it so we can take advantage of the
# storage provided in the rootfs.
TEMPROOT="/usr/lib/python3-numpy/ptest/tmp"
export PYTEST_DEBUG_TEMPROOT="$TEMPROOT"
mkdir -p "$TEMPROOT"
python3 -c "import numpy; numpy.test(label='full', verbose=2)"
rm -rf "$TEMPROOT"
