Skip to content

Commit

Permalink
add coverage hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Jul 7, 2024
1 parent 0c672b3 commit 5b6955b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions c/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ endif

test_%: dependencies
cd ../python; $(MAKE) dependencies $(MFLAGS)
$(PY) -m pytest -vl -n$* test_euler.py
$(PY) -m pytest -vl -n$* test_euler.py --cov

test: dependencies
$(PY) -m pytest -vl --benchmark-sort=fullname --benchmark-group-by=fullfunc --benchmark-verbose test_euler.py
$(PY) -m pytest -vl --benchmark-sort=fullname --benchmark-group-by=fullfunc --benchmark-verbose test_euler.py --cov

dependencies:
git submodule init
Expand Down
2 changes: 1 addition & 1 deletion c/test_euler.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
EXE_TEMPLATE = "{}{}p{{:0>4}}.{{}}.{}".format(BUILD_FOLDER, sep, EXE_EXT)
# include sep in the recipe so that Windows won't complain

GCC_TEMPLATE = "{} {{}} -O2 -lm -Wall -Werror -std=c11 -march=native -flto -fwhole-program -o {{}}"
GCC_TEMPLATE = "{} {{}} -O2 -lm -Wall -Werror -std=c11 -march=native -flto -fwhole-program -ftest-coverage -fprofile-arcs -o {{}}"
CLANG_TEMPLATE = "{} {{}} -O2 {} {} -Wall -Werror -std=c11 {} -o {{}}"

templates = {
Expand Down

0 comments on commit 5b6955b

Please sign in to comment.