Skip to content

Commit 4eecdb2

Browse files
committed
Update Makefile
1 parent 9f03851 commit 4eecdb2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66
TEMP_FILE := $(shell mktemp)
77
# Directory in which to build the Fortran when using a standalone build
88
BUILD_DIR := build
9-
# Coverage directory - needed to trick code cov to look in the right place
10-
COV_DIR := $(shell uv run --no-sync python -c 'from pathlib import Path; import example_fgen_basic; print(Path(example_fgen_basic.__file__).parent)')
119

10+
JUNK := $(shell uv run --no-sync python -c 'from pathlib import Path; import example_fgen_basic; print(Path(example_fgen_basic.__file__).parent)'); \
1211
# A helper script to get short descriptions of each target in the Makefile
1312
define PRINT_HELP_PYSCRIPT
1413
import re, sys
@@ -51,7 +50,10 @@ test: ## run the tests (re-installs the package every time so you might want to
5150
# because it is looking for lines in `src` to be run,
5251
# but they're not because lines in `.venv` are run instead.
5352
# We don't have a solution to this yet.
54-
uv run --no-editable --reinstall-package example-fgen-basic pytest -r a -v tests src --doctest-modules --doctest-report ndiff --cov=$(COV_DIR)
53+
#
54+
# Coverage directory - needed to trick code cov to looking at the right place
55+
COV_DIR=$$(uv run --no-sync python -c 'from pathlib import Path; import example_fgen_basic; print(Path(example_fgen_basic.__file__).parent)'); \
56+
uv run --no-editable --reinstall-package example-fgen-basic pytest -r a -v tests src --doctest-modules --doctest-report ndiff --cov=$$COV_DIR
5557

5658
# Note on code coverage and testing:
5759
# You must specify cov=src.

0 commit comments

Comments
 (0)