summaryrefslogtreecommitdiff
path: root/upstream-layers/openembedded-core/meta/recipes-devtools/python/python3-numpy/run-ptest
blob: b5edc5cf48a52079f4681029e9cf26df196b5c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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.
export PYTEST_DEBUG_TEMPROOT="@PTEST_PATH@/tmp"
mkdir -p "$PYTEST_DEBUG_TEMPROOT"

# test_mem_policy fails if there's no C compiler present, but we don't want to
# include gcc as a ptest dependency, so skip that. test_big_arrays uses up a
# large amount of storage, so skip that too.
# remove test_validate_transcendentals if
# https://github.com/numpy/numpy/issues/27460 is resolved
pytest --automake -m "not slow" -k "not test_mem_policy and not test_big_arrays and not test_validate_transcendentals" @PYTHON_SITEPACKAGES_DIR@/numpy
rm -rf "$PYTEST_DEBUG_TEMPROOT"