Files

42 lines
865 B
Makefile
Raw Permalink Normal View History

include Makefile.common
.DEFAULT_GOAL := all
2021-10-05 17:37:08 +02:00
VERBOSE ?= @
SHELL = /bin/bash -o pipefail
PYTEST = python3 -m pytest -vv
2021-10-05 17:37:08 +02:00
PYTHON_PACKAGES := devutils tests
2021-10-05 17:37:08 +02:00
2023-03-22 21:24:46 +01:00
.PHONY: all
2021-10-05 17:37:08 +02:00
all: check test
2021-10-05 17:37:08 +02:00
.PHONY: install install_devel install_devel_edge test test_devutils test_linux
test: test_devutils test_linux
test_devutils:
$(PYTEST) --cov --cov-branch --cov-fail-under=100 tests
test_linux:
./linux/run $(PWD) true; test $$? -eq 0
./linux/run $(PWD) false; test $$? -eq 1
./linux/run $(PWD) does_not_exist; test $$? -eq 127
./linux/run $(PWD) exit 42; test $$? -eq 42
./linux/run $(PWD) echo EXPECTED_RESULT | grep EXPECTED_RESULT
2023-03-22 21:24:46 +01:00
2021-10-05 17:37:08 +02:00
install:
pip3 install --force-reinstall .
install_devel:
pip3 install ".[devel]"
install_devel_edge: install_devel
tools/upgrade_dependencies.py
2021-10-05 17:37:08 +02:00
2023-03-22 21:24:46 +01:00
.PHONY: clean
2021-10-05 17:37:08 +02:00
clean:
rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache build