diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4578f1db1b..28546f8332 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,8 @@ repos: additional_dependencies: [types-cachetools] args: ["--config-file=pyproject.toml", "python/cuvs/cuvs", - "cpp/cmake/modules"] + "cpp/cmake/modules", + "cpp/tests/python"] pass_filenames: false - repo: https://github.com/PyCQA/pydocstyle rev: 6.1.1 diff --git a/ci/test_cpp.sh b/ci/test_cpp.sh index d1a1d2d5f4..5b7a393f31 100755 --- a/ci/test_cpp.sh +++ b/ci/test_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION. +# SPDX-FileCopyrightText: Copyright (c) 2022-2026, NVIDIA CORPORATION. # SPDX-License-Identifier: Apache-2.0 set -euo pipefail @@ -43,9 +43,15 @@ EXITCODE=0 trap "EXITCODE=1" ERR set +e +# Run Python build utilities tests +rapids-logger "Run libcuvs Python build utilities tests" +pytest cpp/tests/python + # Run libcuvs gtests from libcuvs-tests package -cd "$CONDA_PREFIX"/bin/gtests/libcuvs +rapids-logger "Run libcuvs tests" +pushd "$CONDA_PREFIX"/bin/gtests/libcuvs ctest -j8 --output-on-failure +popd rapids-logger "Test script exiting with value: $EXITCODE" exit ${EXITCODE} diff --git a/python/cuvs/cuvs/tests/test_compute_matrix_product.py b/cpp/tests/python/test_compute_matrix_product.py similarity index 98% rename from python/cuvs/cuvs/tests/test_compute_matrix_product.py rename to cpp/tests/python/test_compute_matrix_product.py index 7ed54276ff..81b6b13bc2 100644 --- a/python/cuvs/cuvs/tests/test_compute_matrix_product.py +++ b/cpp/tests/python/test_compute_matrix_product.py @@ -17,7 +17,7 @@ compute_matrix_product_script = runpy.run_path( str( pathlib.Path(__file__).parent - / "../../../../cpp/cmake/modules/compute_matrix_product.py" + / "../../cmake/modules/compute_matrix_product.py" ) ) diff --git a/dependencies.yaml b/dependencies.yaml index 10aabd4dc0..329265aae1 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -382,6 +382,7 @@ dependencies: packages: - *cmake_ver - openblas + - &pytest pytest<9.0.0 docs: common: - output_types: [conda] @@ -444,7 +445,7 @@ dependencies: common: - output_types: [conda, requirements, pyproject] packages: - - pytest<9.0.0 + - *pytest - pytest-cov test_py_cuvs: common: