Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce error handling verbosity in CI tests scripts #12738

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions ci/test_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ set -u
CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp)
RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"}/
mkdir -p "${RAPIDS_TESTS_DIR}"
SUITEERROR=0

rapids-print-env

Expand All @@ -32,6 +31,8 @@ rapids-mamba-retry install \
rapids-logger "Check GPU usage"
nvidia-smi

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

# TODO: Disabling stream identification for now.
Expand Down Expand Up @@ -61,12 +62,6 @@ for gt in "$CONDA_PREFIX"/bin/gtests/{libcudf,libcudf_kafka}/* ; do
#else
# GTEST_CUDF_STREAM_MODE="custom" LD_PRELOAD=${STREAM_IDENTIFY_LIB} ${gt} --gtest_output=xml:${RAPIDS_TESTS_DIR}
#fi

exitcode=$?
if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: GTest ${gt}"
fi
done

if [[ "${RAPIDS_BUILD_TYPE}" == "nightly" ]]; then
Expand All @@ -85,4 +80,5 @@ if [[ "${RAPIDS_BUILD_TYPE}" == "nightly" ]]; then
# TODO: test-results/*.cs.log are processed in gpuci
fi

exit ${SUITEERROR}
rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
13 changes: 4 additions & 9 deletions ci/test_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,17 @@ rapids-mamba-retry install \
--channel "${CPP_CHANNEL}" \
libcudf

SUITEERROR=0

rapids-logger "Check GPU usage"
nvidia-smi

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

rapids-logger "Run Java tests"
pushd java
mvn test -B -DCUDF_JNI_ARROW_STATIC=OFF -DCUDF_JNI_ENABLE_PROFILING=OFF
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in cudf Java"
fi
popd

exit ${SUITEERROR}
rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
9 changes: 4 additions & 5 deletions ci/test_notebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ pushd notebooks
# (space-separated list of filenames without paths)
SKIPNBS=""

# Set SUITEERROR to failure if any run fails
SUITEERROR=0

EXITCODE=0
trap "EXITCODE=1" ERR
set +e
for nb in $(find . -name "*.ipynb"); do
nbBasename=$(basename ${nb})
Expand All @@ -55,8 +54,8 @@ for nb in $(find . -name "*.ipynb"); do
else
nvidia-smi
${NBTEST} ${nbBasename}
SUITEERROR=$((SUITEERROR | $?))
fi
done

exit ${SUITEERROR}
rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
1 change: 0 additions & 1 deletion ci/test_python_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python)
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}"
SUITEERROR=0

rapids-print-env

Expand Down
23 changes: 4 additions & 19 deletions ci/test_python_cudf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ source "$(dirname "$0")/test_python_common.sh"
rapids-logger "Check GPU usage"
nvidia-smi

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

rapids-logger "pytest cudf"
Expand All @@ -24,12 +26,6 @@ pytest \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cudf-coverage.xml" \
--cov-report=term \
tests
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in cudf"
fi
popd

# Run benchmarks with both cudf and pandas to ensure compatibility is maintained.
Expand All @@ -48,12 +44,6 @@ pytest \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cudf-benchmark-coverage.xml" \
--cov-report=term \
benchmarks
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in cudf"
fi

rapids-logger "pytest for cudf benchmarks using pandas"
CUDF_BENCHMARKS_USE_PANDAS=ON \
Expand All @@ -67,12 +57,7 @@ pytest \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cudf-benchmark-pandas-coverage.xml" \
--cov-report=term \
benchmarks
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in cudf"
fi
popd

exit ${SUITEERROR}
rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}
29 changes: 4 additions & 25 deletions ci/test_python_other.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ rapids-mamba-retry install \
rapids-logger "Check GPU usage"
nvidia-smi

EXITCODE=0
trap "EXITCODE=1" ERR
set +e

rapids-logger "pytest dask_cudf"
Expand All @@ -26,12 +28,6 @@ pytest \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/dask-cudf-coverage.xml" \
--cov-report=term \
dask_cudf
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in dask-cudf"
fi
popd

rapids-logger "pytest custreamz"
Expand All @@ -46,12 +42,6 @@ pytest \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/custreamz-coverage.xml" \
--cov-report=term \
custreamz
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in custreamz"
fi
popd

set -e
Expand All @@ -73,12 +63,6 @@ pytest \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/strings-udf-coverage.xml" \
--cov-report=term \
tests
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in strings_udf"
fi
popd

rapids-logger "pytest cudf with strings_udf"
Expand All @@ -94,12 +78,7 @@ pytest \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cudf-strings-udf-coverage.xml" \
--cov-report=term \
tests/test_udf_masked_ops.py
exitcode=$?

if (( ${exitcode} != 0 )); then
SUITEERROR=${exitcode}
echo "FAILED: 1 or more tests in cudf with strings_udf"
fi
popd

exit ${SUITEERROR}
rapids-logger "Test script exiting with value: $EXITCODE"
exit ${EXITCODE}