Skip to content

Commit

Permalink
build: split make tests
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Feb 22, 2024
1 parent b45074d commit 2f5ef97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ make CUVEC_DEBUG=1 build-editable
Once installed in development/editable mode, tests may be run using:

```sh
pytest -k "not perf"
make test-cov
```

To run performance tests, build with debugging disabled (`CUVEC_DEBUG=0`), then run:

```sh
pytest -k "perf" -n=0
make test-perf
python tests/test_perf.py
```
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ CCACHE=
ifneq ($(CCACHE),)
BUILD_CMAKE_FLAGS+= -Ccmake.define.CMAKE_CXX_COMPILER_LAUNCHER=ccache
endif
.PHONY: build-editable clean deps-build deps-run build-wheel deps-docs docs docs-serve
.PHONY: build-editable test test-cov test-perf clean deps-build deps-run build-wheel deps-docs docs docs-serve
build-editable:
git diff --exit-code --quiet '*/src/**' || (echo "Uncommitted changes in */src"; exit 1)
pip install --no-build-isolation --check-build-dependencies -Cbuild-dir=build --no-deps -t . -U -v . $(BUILD_CMAKE_FLAGS)
git restore '*/src/**'
test:
test: test-cov test-perf
test-cov:
pytest -k "not perf" -n=3
test-perf:
pytest -k "perf" -n=0 --cov-append
clean:
git clean -Xdf
Expand Down

0 comments on commit 2f5ef97

Please sign in to comment.