test: rename mpp-*.json to *.mpp.json

This simplifies the `test-data` rules in `Makefile` considerably. Also,
it allows adding `*.mpp.json` files in other directories without needing
to copy rules. (make's pattern-based rules only allow a single `%`).

Adjust test/data/README.md accordingly.
This commit is contained in:
Lars Karlitski 2020-10-16 20:18:42 +02:00 committed by Tom Gundersen
parent c11459c626
commit d9ef44eb6d
7 changed files with 7 additions and 7 deletions

View file

@ -205,10 +205,10 @@ coverity-clean-all: coverity-clean
# for linters and other tests on the source code. # for linters and other tests on the source code.
# #
TEST_MANIFESTS_MPP = $(wildcard $(SRCDIR)/test/data/manifests/mpp-*.json) TEST_MANIFESTS_MPP = $(wildcard $(SRCDIR)/test/data/manifests/*.mpp.json)
TEST_MANIFESTS_GEN = $(patsubst $(SRCDIR)/test/data/manifests/mpp-%.json,$(SRCDIR)/test/data/manifests/%.json,$(TEST_MANIFESTS_MPP)) TEST_MANIFESTS_GEN = $(TEST_MANIFESTS_MPP:%.mpp.json=%.json)
$(TEST_MANIFESTS_GEN): $(SRCDIR)/test/data/manifests/%.json: $(SRCDIR)/test/data/manifests/mpp-%.json $(TEST_MANIFESTS_GEN): %.json: %.mpp.json
$(SRCDIR)/tools/mpp-depsolve.py <"$<" \ $(SRCDIR)/tools/mpp-depsolve.py <"$<" \
| $(SRCDIR)/tools/mpp-import-pipeline.py >"$@" \ | $(SRCDIR)/tools/mpp-import-pipeline.py >"$@" \
"--cwd=$(SRCDIR)/test/data/manifests" "--cwd=$(SRCDIR)/test/data/manifests"

View file

@ -32,10 +32,10 @@ do not allow comments, this file shortly describes their purpose.
this manifest's tree is constructed just from the filesystem package and is this manifest's tree is constructed just from the filesystem package and is
marked using the selinux stage. marked using the selinux stage.
Manifests prefixed with `mpp-*` are fed through the ManifestPreProcessors and Manifests ending on `.mpp.json` are fed through the ManifestPreProcessors
then stored in the same directory with the `mpp-*` prefix dropped. The and then stored in the same directory with an `.json` extension (replacing
generated files are committed to the repository. Nevertheless, if you need to `.mpp.json`). generated files are committed to the repository. Nevertheless,
regenerate them, use `make test-data`. if you need to regenerate them, use `make test-data`.
* `./sources/`: * `./sources/`:
This directory contains test-data for runtime tests of the source-engines. It This directory contains test-data for runtime tests of the source-engines. It