-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathrun_test.sh
executable file
·40 lines (33 loc) · 1.02 KB
/
run_test.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
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
# if ONEAPI_ROOT is specified (use all from it)
if [ -n "${ONEAPI_ROOT}" ]; then
export DPCPPROOT=${ONEAPI_ROOT}/compiler/latest
export MKLROOT=${ONEAPI_ROOT}/mkl/latest
export TBBROOT=${ONEAPI_ROOT}/tbb/latest
export DPLROOT=${ONEAPI_ROOT}/dpl/latest
fi
# if DPCPPROOT is specified (work with custom DPCPP)
if [ -n "${DPCPPROOT}" ]; then
# shellcheck source=/dev/null
. "${DPCPPROOT}"/env/vars.sh
fi
# if MKLROOT is specified (work with custom math library)
if [ -n "${MKLROOT}" ]; then
# shellcheck source=/dev/null
. "${MKLROOT}"/env/vars.sh
fi
# have to activate while SYCL CPU device/driver needs paths
# if TBBROOT is specified
if [ -n "${TBBROOT}" ]; then
# shellcheck source=/dev/null
. "${TBBROOT}"/env/vars.sh
fi
# If PYTHON is not set
# assign it to the Python interpreter from the testing environment
if [ -z "${PYTHON}" ]; then
PYTHON=$PREFIX/bin/python
fi
set -e
$PYTHON -c "import dpnp; print(dpnp.__version__)"
$PYTHON -m dpctl -f
$PYTHON -m pytest -ra --pyargs dpnp