forked from data-apis/array-api-compat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_cupy.sh
executable file
·29 lines (22 loc) · 918 Bytes
/
test_cupy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
# We cannot test cupy on CI so this script will test it manually. Assumes it
# is being run in an environment that has cupy and the array-api-tests
# dependencies installed
set -x
set -e
# Run the vendoring tests in this repo
pytest
tmpdir=$(mktemp -d)
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
export PYTHONPATH="$PYTHONPATH:$SCRIPT_DIR"
PYTEST_ARGS="--max-examples 200 -v -rxXfE --ci --hypothesis-disable-deadline"
cd $tmpdir
git clone https://github.com/data-apis/array-api-tests
cd array-api-tests
git submodule update --init
# store the hypothesis examples database in this directory, so that failures
# will be remembered across runs
mkdir -p $SCRIPT_DIR/.hypothesis
ln -s $SCRIPT_DIR/.hypothesis .hypothesis
export ARRAY_API_TESTS_MODULE=array_api_compat.cupy
pytest array_api_tests/ ${PYTEST_ARGS} --xfails-file $SCRIPT_DIR/cupy-xfails.txt "$@"