Makefile: use pytest for nicer output
Also prepare to actually use the pytest module from the tests.
This commit is contained in:
parent
27d4450352
commit
7a745e4084
3 changed files with 19 additions and 18 deletions
32
Makefile
32
Makefile
|
|
@ -223,35 +223,31 @@ test-data: $(TEST_MANIFESTS_GEN)
|
|||
|
||||
.PHONY: test-module
|
||||
test-module:
|
||||
@$(PYTHON3) -m unittest \
|
||||
discover \
|
||||
--start=$(SRCDIR)/test/mod \
|
||||
--top-level-directory=$(SRCDIR) \
|
||||
@$(PYTHON3) -m pytest \
|
||||
$(SRCDIR)/test/mod \
|
||||
--rootdir=$(SRCDIR) \
|
||||
-v
|
||||
|
||||
.PHONY: test-runtime
|
||||
.PHONY: test-run
|
||||
test-run:
|
||||
@[[ $${EUID} -eq 0 ]] || (echo "Error: Root privileges required!"; exit 1)
|
||||
@$(PYTHON3) -m unittest \
|
||||
discover \
|
||||
--start=$(SRCDIR)/test/run \
|
||||
--top-level-directory=$(SRCDIR) \
|
||||
@$(PYTHON3) -m pytest \
|
||||
$(SRCDIR)/test/run \
|
||||
--rootdir=$(SRCDIR) \
|
||||
-v
|
||||
|
||||
.PHONY: test-src
|
||||
test-src:
|
||||
@$(PYTHON3) -m unittest \
|
||||
discover \
|
||||
--start=$(SRCDIR)/test/src \
|
||||
--top-level-directory=$(SRCDIR) \
|
||||
@$(PYTHON3) -m pytest \
|
||||
$(SRCDIR)/test/src \
|
||||
--rootdir=$(SRCDIR) \
|
||||
-v
|
||||
|
||||
.PHONY: test
|
||||
.PHONY: test-all
|
||||
test-all:
|
||||
@$(PYTHON3) -m unittest \
|
||||
discover \
|
||||
--start=$(SRCDIR)/test \
|
||||
--top-level-directory=$(SRCDIR) \
|
||||
@$(PYTHON3) -m pytest \
|
||||
$(SRCDIR)/test \
|
||||
--rootdir=$(SRCDIR) \
|
||||
-v
|
||||
|
||||
#
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@ At build-time, the following software is required:
|
|||
* `python-docutils >= 0.13`
|
||||
* `pkg-config >= 0.29`
|
||||
|
||||
Testing requires additional software:
|
||||
|
||||
* `pytest`
|
||||
|
||||
### Build
|
||||
|
||||
The standard python package system is used. Consult upstream documentation for
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
jsonschema
|
||||
pytest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue