mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 06:45:13 +01:00
And add a single test which verifies that our internal `reboot` code actually does what it should (via systemd-run etc.) This took me way, way too long to do...there were so many missteps and confusion. First of all, I kept trying to use `systemd.extra-unit` from https://www.freedesktop.org/software/systemd/man/latest/systemd-debug-generator.html# but that doesn't exist in stream9. I spent way too long trying to debug the fact that switching from `podman run <image> /sbin/init` to `podman run <image> /bin/sh -c '<stuff> && exec /sbin/init` fails because in the latter case podman's auto-detection fails and we need to explicitly say `--systemd=always`. In retrospect obvious...but oh well. On the positive side, I think with some cleanup we could extend this model and generalize it for "test running in a container with systemd" (with a lot of cleanup really) Signed-off-by: Colin Walters <walters@verbum.org>
19 lines
731 B
Makefile
19 lines
731 B
Makefile
# Build the container image from current sources
|
|
build *ARGS:
|
|
podman build --jobs=4 -t localhost/bootc {{ARGS}} .
|
|
|
|
# This container image has additional testing content and utilities
|
|
build-integration-test-image *ARGS: build
|
|
podman build --jobs=4 -t localhost/bootc-integration -f hack/Containerfile {{ARGS}} .
|
|
|
|
# Run container integration tests
|
|
run-container-integration: build-integration-test-image
|
|
podman run --rm localhost/bootc-integration bootc-integration-tests container
|
|
|
|
# These tests may spawn their own container images.
|
|
run-container-external-tests:
|
|
./tests/container/run localhost/bootc
|
|
|
|
unittest *ARGS:
|
|
podman build --jobs=4 --target units -t localhost/bootc-units --build-arg=unitargs={{ARGS}} .
|