Skip to content

Commit 6db888d

Browse files
authored
CI: add tests-quiet make target to spare terminal (#5624)
Alternative would be to instead make default tests quiet, and add a tests-verbose? WDYT?
1 parent b52a870 commit 6db888d

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ VENV_GROUPS ?= --all-groups
1717

1818
# default lit options
1919
LIT_OPTIONS ?= -v --order=smart
20+
PYTEST_OPTIONS ?= -vv
21+
# quiet options for tests-quiet (minimal terminal output)
22+
LIT_OPTIONS_QUIET ?= -q --order=smart
23+
PYTEST_OPTIONS_QUIET ?= -q --tb=no
2024

2125
# make tasks run all commands in a single shell
2226
.ONESHELL:
@@ -71,7 +75,7 @@ filecheck: uv-installed ## run filecheck tests
7175

7276
.PHONY: pytest
7377
pytest: uv-installed ## run pytest tests
74-
uv run pytest tests -W error -vv
78+
uv run pytest tests -W error $(PYTEST_OPTIONS)
7579

7680
.PHONY: filecheck-toy
7781
filecheck-toy: uv-installed ## run tests for Toy tutorial
@@ -80,7 +84,7 @@ filecheck-toy: uv-installed ## run tests for Toy tutorial
8084
.PHONY: pytest-toy-nb
8185
pytest-toy-nb:
8286
@if uv run python -c "import riscemu" > /dev/null 2>&1; then \
83-
uv run pytest -W error --nbval -vv docs/Toy --nbval-current-env; \
87+
uv run pytest -W error --nbval $(PYTEST_OPTIONS) docs/Toy --nbval-current-env; \
8488
else \
8589
echo "riscemu is not installed, skipping tests."; \
8690
fi
@@ -122,6 +126,10 @@ tests-marimo: uv-installed
122126
tests-functional: pytest tests-toy filecheck tests-marimo ## run functional tests
123127
@echo All functional tests done.
124128

129+
.PHONY: tests-quiet
130+
tests-quiet: uv-installed ## run functional tests with minimal output
131+
$(MAKE) tests-functional LIT_OPTIONS="$(LIT_OPTIONS_QUIET)" PYTEST_OPTIONS="$(PYTEST_OPTIONS_QUIET)"
132+
125133
.PHONY: tests
126134
tests: tests-functional pyright ## run all tests
127135
@echo All tests done.

0 commit comments

Comments
 (0)