-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (44 loc) · 1.62 KB
/
Copy pathMakefile
File metadata and controls
54 lines (44 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Adds file annotations to Github Actions (only useful on CI)
GITHUB_ACTIONS_FORMATTING=0
ifeq ($(GITHUB_ACTIONS_FORMATTING), 1)
FLAKE8_FORMAT=--format='::error file=%(path)s,line=%(row)d,col=%(col)d,title=%(code)s::%(path)s:%(row)d:%(col)d: %(code)s %(text)s'
else
FLAKE8_FORMAT=
endif
.PHONY: test docs smoke
docs:
# put -n back in when things are better documented
@(cd docs/ && (make html SPHINXOPTS="-W --keep-going"))
lint:
@echo " Linting FUSE codebase"
@python3 -m flake8 $(FLAKE8_FORMAT) fuse
@echo " Linting FUSE test suite"
@python3 -m flake8 $(FLAKE8_FORMAT) test
test_examples:
@echo " Running examples"
@python3 -m pytest test/test_2d_examples_docs.py
@python3 -m pytest test/test_3d_examples_docs.py
# Collecting the whole suite would import Firedrake, so name the files instead.
# conftest stays the single source of truth for which ones they are.
SMOKE_FILES = $(shell python3 -c "import conftest; print(' '.join(sorted('test/%s.py' % m for m in conftest.SMOKE_MODULES)))")
smoke:
@echo " Running fast tests (no Firedrake)"
@python3 -m pytest -m smoke -rx $(SMOKE_FILES)
tests:
@echo " Running all tests"
@python3 -m coverage run -p -m pytest -rx test
coverage:
@python3 -m coverage combine
@python3 -m coverage report -m
@python3 -m coverage json
test_cells:
@echo " Running all cell comparison tests"
@firedrake-clean
@python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect0]
@firedrake-clean
@python3 -m pytest -rPx --run-cleared test/test_cells.py::test_ref_els[expect1]
clean:
@(cd docs/ && make clean)
prepush: lint tests
@rm .coverage.*
make clean docs