-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 2.09 KB
/
Copy pathMakefile
File metadata and controls
44 lines (34 loc) · 2.09 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
.DEFAULT_GOAL := help
.PHONY: help init test test-fast test-resource-intensive test-resource-intensive-dymola test-resources-intensive-dymola test-all
PYTEST := poetry run pytest
PYTEST_ARGS := tests --doctest-modules
PYTEST_EXTRA_ARGS ?=
FAST_TEST_MARKERS := not simulation and not compilation and not dymola
RESOURCE_TEST_MARKERS := (simulation or compilation) and not dymola
DYMOLA_TEST_MARKERS := dymola
help:
@echo "Available make targets:"
@echo " make help List available targets and when to use them."
@echo " make init Install project dependencies with Poetry."
@echo " make test Run the default quick local test suite."
@echo " make test-fast Run tests that do not require simulation, compilation, Docker, or Dymola."
@echo " make test-resource-intensive Run simulation or compilation tests that do not require Dymola."
@echo " make test-resource-intensive-dymola Run Dymola-only tests; requires a local Dymola install and license."
@echo " make test-resources-intensive-dymola Run the same Dymola-only suite using the legacy plural target name."
@echo " make test-all Run fast tests, then resource-intensive non-Dymola tests."
init:
poetry install
# Default to the quick local feedback loop; this excludes Docker workloads.
test: test-fast
test-fast:
$(PYTEST) $(PYTEST_ARGS) -n auto --dist loadgroup -m '$(FAST_TEST_MARKERS)' $(PYTEST_EXTRA_ARGS)
# One pytest process intentionally keeps Docker simulations and compilations serial.
test-resource-intensive:
$(PYTEST) $(PYTEST_ARGS) -m '$(RESOURCE_TEST_MARKERS)' $(PYTEST_EXTRA_ARGS)
# Dymola requires a local installation and license, and must run in series.
test-resources-intensive-dymola:
$(PYTEST) $(PYTEST_ARGS) -m '$(DYMOLA_TEST_MARKERS)' $(PYTEST_EXTRA_ARGS)
# Provide the singular spelling alongside the requested command.
test-resource-intensive-dymola: test-resources-intensive-dymola
# Run the fast suite first, then the resource-intensive suite in series.
test-all: test-fast test-resource-intensive