Commit Graph

3 Commits

Author SHA1 Message Date
Michal Domonkos 647af128fc Add support for "pinned" tests
Whenever we bump the RPM version in cmake, certain tests also need
updating, e.g. those that compare package digests or RPM sonames as
those are subject to the version number.

Up until now, this had to be done manually by running the test-suite,
looking at the failed tests' diffs and fixing up the expected outputs by
hand.

No more!  Separate those tests and add the "make pinned" cmake target to
update them automatically.  This makes use of the new-ish atshell
feature which runs a shell/command (*.sh scripts in tests/pinned/ in
this case) in the standard test environment in order to get the new
outputs.

See the included README for more details.
2024-01-04 12:37:30 +02:00
Michal Domonkos 302793af0b Exit from mktree on failure
Right now, if the podman image fails to build or rpm fails to
build/install, we happily continue and run the test-suite, only to
eventually fail with some cryptic error, such as:

    error: cannot find rpm

Not too helpful, indeed.  Instead, just fail the whole tree preparation
process if we encounter an error.

Fix the return code of unshared() so that we don't fail on that, though.
Also, when building the RPM layer, use a proper cleanup trap instead of
ignoring SIGINT since a failing make_install() can now terminate the
script.

Fixes: #2667
2023-11-01 09:27:05 +02:00
Michal Domonkos 05c3b37d1f Rename mktree.podman to mktree.oci
This name is a better fit as it puts more emphasis on the format of the
resulting tree, not as much on the actual container engine used (which
can be swapped, and currently is in the CI where we use docker instead
of podman).

Also drop the awkward .docker symlink now and instead pass the container
engine through the MKTREE_ENGINE environment variable.
2023-10-31 14:53:29 +02:00