mirror of
https://github.com/seemoo-lab/opendrop.git
synced 2026-09-14 15:16:11 -04:00
Add rudimentary pytests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
.PHONY: ci checkformat lint install run autoformat
|
||||
.PHONY: ci checkformat lint test run autoformat
|
||||
|
||||
VENV_NAME?=venv
|
||||
VENV_ACTIVATE=. $(VENV_NAME)/bin/activate
|
||||
@@ -11,24 +11,21 @@ venv: $(VENV_NAME)/bin/activate
|
||||
|
||||
$(VENV_NAME)/bin/activate: setup.py requirements-dev.txt Makefile
|
||||
test -d $(VENV_NAME) || virtualenv -p python3 $(VENV_NAME)
|
||||
$(PYTHON) -m pip install -U pip
|
||||
$(PYTHON) -m pip install --upgrade pip
|
||||
$(PYTHON) -m pip install -r requirements-dev.txt
|
||||
$(PYTHON) -m pip install -e .
|
||||
touch $(VENV_NAME)/bin/activate
|
||||
|
||||
ci: checkformat lint install
|
||||
ci: checkformat lint test
|
||||
|
||||
checkformat:
|
||||
$(PYTHON) -m yapf --diff -r setup.py $(PROJECT)
|
||||
checkformat: venv
|
||||
$(PYTHON) -m yapf . -r --diff --exclude $(VENV_NAME)
|
||||
|
||||
lint: venv
|
||||
$(PYTHON) -m flake8 --statistics --show-source setup.py $(PROJECT)
|
||||
$(PYTHON) -m flake8 . --count --show-source --statistics --exclude $(VENV_NAME)
|
||||
|
||||
install: venv
|
||||
$(PYTHON) -m pip install .
|
||||
|
||||
run: install
|
||||
$(VENV_NAME)/bin/$(PROJECT) receive
|
||||
test: venv
|
||||
$(PYTHON) -m pytest
|
||||
|
||||
autoformat: venv
|
||||
$(PYTHON) -m yapf -i -r setup.py $(PROJECT)
|
||||
$(PYTHON) -m yapf . -r --in-place --exclude $(VENV_NAME)
|
||||
|
||||
Reference in New Issue
Block a user