-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathtest_python.sh
More file actions
executable file
·57 lines (42 loc) · 1.72 KB
/
Copy pathtest_python.sh
File metadata and controls
executable file
·57 lines (42 loc) · 1.72 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION.
# SPDX-License-Identifier: Apache-2.0
set -euo pipefail
# Support invoking test_python.sh outside the script directory
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../
rapids-logger "Create test conda environment"
. /opt/conda/etc/profile.d/conda.sh
rapids-logger "Configuring conda strict channel priority"
conda config --set channel_priority strict
rapids-logger "Downloading artifacts from previous jobs"
CPP_CHANNEL=$(rapids-download-conda-from-github cpp)
PYTHON_CHANNEL=$(rapids-download-from-github "$(rapids-package-name "conda_python" rmm --stable --cuda "$RAPIDS_CUDA_VERSION")")
rapids-dependency-file-generator \
--output conda \
--file-key test_python \
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION};dependencies=${RAPIDS_DEPENDENCIES}" \
--prepend-channel "${CPP_CHANNEL}" \
--prepend-channel "${PYTHON_CHANNEL}" \
| tee env.yaml
rapids-mamba-retry env create --yes -f env.yaml -n test
# Temporarily allow unbound variables for conda activation.
set +u
conda activate test
set -u
rapids-print-env
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}
RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"}
mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}"
rapids-logger "Check system info"
uname -a
nvidia-smi
rapids-logger "pytest rmm"
timeout 10m ./ci/run_pytests.sh \
--junitxml="${RAPIDS_TESTS_DIR}/junit-rmm.xml" \
--cov-config=.coveragerc \
--cov=rmm \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/rmm-coverage.xml" \
--cov-report term \
&& EXITCODE=$? || EXITCODE=$?;
rapids-logger "Test script exiting with value: $EXITCODE"
exit "${EXITCODE}"