diff --git a/Makefile b/Makefile index 91a21565..91be8d95 100644 --- a/Makefile +++ b/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 # diff --git a/README.md b/README.md index 13304e5f..b612f613 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/requirements.txt b/requirements.txt index d89304b1..598596ea 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ jsonschema +pytest