2023-03-23 10:24:39 +01:00
|
|
|
include Makefile.common
|
|
|
|
|
|
2023-05-12 12:04:02 +02:00
|
|
|
.DEFAULT_GOAL := all
|
|
|
|
|
|
2021-10-05 17:37:08 +02:00
|
|
|
VERBOSE ?= @
|
2023-11-15 13:53:17 +00:00
|
|
|
SHELL = /bin/bash -o pipefail
|
2023-12-12 15:49:32 +01:00
|
|
|
PYTEST = python3 -m pytest -vv
|
2021-10-05 17:37:08 +02:00
|
|
|
|
2023-12-12 15:49:32 +01: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
|
|
|
|
2023-11-15 13:53:17 +00:00
|
|
|
all: check test
|
2021-10-05 17:37:08 +02:00
|
|
|
|
2023-12-12 15:49:32 +01:00
|
|
|
.PHONY: install install_devel install_devel_edge test test_devutils test_linux
|
2023-11-15 13:53:17 +00:00
|
|
|
|
2023-12-12 15:49:32 +01:00
|
|
|
test: test_devutils test_linux
|
|
|
|
|
|
|
|
|
|
test_devutils:
|
|
|
|
|
$(PYTEST) --cov --cov-branch --cov-fail-under=100 tests
|
|
|
|
|
|
|
|
|
|
test_linux:
|
2023-11-15 13:53:17 +00:00
|
|
|
./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
|
2021-11-01 09:01:39 +01:00
|
|
|
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:
|
2023-05-12 12:04:02 +02:00
|
|
|
rm -rf .coverage .mypy_cache .pytest_cache .ruff_cache build
|