diff --git a/make/py-run.mk b/make/py-run.mk index 2c4d7950..43c210ed 100644 --- a/make/py-run.mk +++ b/make/py-run.mk @@ -5,6 +5,7 @@ include $(JWBDIR)/make/py-defs.mk EXE ?= $(firstword $(wildcard main.py runme.py test.py *.py)) EXE_ARGS ?= +PYTHON_RUNNER ?= $(PYTHON) all: install: @@ -13,7 +14,7 @@ distclean: test: all run: - $(PYTHON) $(EXE) $(EXE_ARGS) + $(PYTHON_RUNNER) $(EXE) $(EXE_ARGS) run.sh: echo -e "#!/bin/bash\n\nexport PYTHONPATH=$(PYTHONPATH)\nset -x\nexec $(PYTHON) $(EXE)" '"$$@"' > $@.tmp diff --git a/make/py-test.mk b/make/py-test.mk new file mode 100644 index 00000000..3d77f7e0 --- /dev/null +++ b/make/py-test.mk @@ -0,0 +1,6 @@ +PYTHON_RUNNER ?= pytest -v + +include $(JWBDIR)/make/py-run.mk + +all: +test: run