test: add F32 manifests and a manifest-preprocessor
This adds F32 manifests in ./test/data/. To avoid magically deducing the package list out of the void, this adds a ManifestPreProcessor (MPP) called `./tools/mpp-depsolve.py`. What this does is it takes a manifest on stdin, modifies it, and produces a manifest on stdout. The `mpp-depsolve.py` preprocessor takes a manifest and modifies all the `org.osbuild.rpm` stages. It parses a new option to that stage called `mpp-depsolve`, which contains a package-list, a repo-list, and dnf metadata. It then drops this `mpp-depsolve` option (since it would be an invalid manifest otherwise), depsolves the packages, inserts a proper "packages" option as well as appends the correct paths to the sources entry. With this in place, this adds `mpp-f32-base.json` and `mpp-f32-build.json` in ./test/data/manifests/. These will then be used as base F32 manifests for our test-suite. Lastly, this adds `./test/data/README.md` as a place to document the files we place in `./test/data/`, since most of the files do not allow for comments.
This commit is contained in:
parent
0ffae822ce
commit
7dcc946fe2
7 changed files with 1355 additions and 0 deletions
10
Makefile
10
Makefile
|
|
@ -79,6 +79,7 @@ help:
|
|||
@echo " man: Generate all man-pages"
|
||||
@echo
|
||||
@echo " test-all: Run all tests"
|
||||
@echo " test-data: Generate test data"
|
||||
@echo " test-module: Run all module unit-tests"
|
||||
@echo " test-runtime: Run all osbuild pipeline tests"
|
||||
@echo " test-src: Run all osbuild source tests"
|
||||
|
|
@ -116,6 +117,15 @@ man: $(MANPAGES_TROFF)
|
|||
# for linters and other tests on the source code.
|
||||
#
|
||||
|
||||
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): $(SRCDIR)/test/data/manifests/%.json: $(SRCDIR)/test/data/manifests/mpp-%.json
|
||||
$(SRCDIR)/tools/mpp-depsolve.py <"$<" >"$@"
|
||||
|
||||
.PHONY: test-data
|
||||
test-data: $(TEST_MANIFESTS_GEN)
|
||||
|
||||
.PHONY: test-units
|
||||
test-module:
|
||||
@$(PYTHON3) -m unittest \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue