summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-numpy/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3-numpy/run-ptest')
-rw-r--r--meta/recipes-devtools/python/python3-numpy/run-ptest15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy/run-ptest b/meta/recipes-devtools/python/python3-numpy/run-ptest
new file mode 100644
index 0000000000..6e76dffc59
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-numpy/run-ptest
@@ -0,0 +1,15 @@
1#!/bin/sh
2
3# By default, numpy will use /tmp as the root path for temporary files used
4# during tests, but if this is a tmpfs it may fill up quickly and cause many of
5# the tests to report "no space left on device" errors. Create a custom
6# directory for these and point pytest at it so we can take advantage of the
7# storage provided in the rootfs.
8export PYTEST_DEBUG_TEMPROOT="/usr/lib/python3-numpy/ptest/tmp"
9mkdir -p "$PYTEST_DEBUG_TEMPROOT"
10
11# test_mem_policy fails if there's no C compiler present, but we don't want to
12# include gcc as a ptest dependency, so skip that. test_big_arrays uses up a
13# large amount of storage, so skip that too.
14pytest --automake -m "not slow" -k "not test_mem_policy and not test_big_arrays" /usr/lib/python3.*/site-packages/numpy
15rm -rf "$PYTEST_DEBUG_TEMPROOT"