diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3-numpy/run-ptest')
-rw-r--r-- | meta/recipes-devtools/python/python3-numpy/run-ptest | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/meta/recipes-devtools/python/python3-numpy/run-ptest b/meta/recipes-devtools/python/python3-numpy/run-ptest index 9a1c72aeb1..6e76dffc59 100644 --- a/meta/recipes-devtools/python/python3-numpy/run-ptest +++ b/meta/recipes-devtools/python/python3-numpy/run-ptest | |||
@@ -1,5 +1,15 @@ | |||
1 | #!/usr/bin/env python3 | 1 | #!/bin/sh |
2 | 2 | ||
3 | import numpy | 3 | # By default, numpy will use /tmp as the root path for temporary files used |
4 | numpy.test(label='full', verbose=2) | 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. | ||
8 | export PYTEST_DEBUG_TEMPROOT="/usr/lib/python3-numpy/ptest/tmp" | ||
9 | mkdir -p "$PYTEST_DEBUG_TEMPROOT" | ||
5 | 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. | ||
14 | pytest --automake -m "not slow" -k "not test_mem_policy and not test_big_arrays" /usr/lib/python3.*/site-packages/numpy | ||
15 | rm -rf "$PYTEST_DEBUG_TEMPROOT" | ||