mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-23 21:35:26 +03:00
6e9d00dbeb
Reusing the way `standard-test-roles` has support for booting a qcow2 actually gets us to the "VM-in-container" flow. Plus Ansible over shell script is sometimes nicer. https://fedoraproject.org/wiki/CI/Tests#Testing_an_Atomic_Host It's better than what we were doing before for installed tests, and moreover using Ansible more broadly for testing is going to align us better with Fedora's CI. As part of this I split off a "libpaprci" which I intend to maintain as a "copylib" for a little bit between ostree/rpm-ostree, and then we'll figure out how to expand from there (maybe some of the patterns get "baked in" to PAPR for example). Note the `FAH27-insttests` context moves to the top since it's now of primary importance, and I expect that we start expanding it. Closes: #1462 Approved by: jlebon
47 lines
1.3 KiB
Bash
Executable File
47 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
# Generate a src.rpm, then binary rpms in the current directory
|
|
|
|
set -xeuo pipefail
|
|
|
|
dn=$(dirname $0)
|
|
paprcidir=${dn}/libpaprci
|
|
. ${paprcidir}/libbuild.sh
|
|
|
|
# Auto-provision bootstrap resources if run as root (normally in CI)
|
|
if test "$(id -u)" == 0; then
|
|
pkg_install_buildroot
|
|
pkg_install make /usr/bin/rpmbuild git
|
|
fi
|
|
|
|
# PAPR really should do this
|
|
if ! test -f libglnx/README.md || ! test -f bsdiff/README.md; then
|
|
git submodule update --init
|
|
fi
|
|
|
|
# Default libcurl on by default in fedora unless libsoup is enabled
|
|
if test "${OS_ID}" = 'fedora'; then
|
|
case "${CONFIGOPTS:-}" in
|
|
*--with-soup*|*--without-curl*) ;;
|
|
*) CONFIGOPTS="${CONFIGOPTS:-} --with-curl"
|
|
esac
|
|
fi
|
|
case "${CONFIGOPTS:-}" in
|
|
*--with-curl*|*--with-soup*)
|
|
if test -x /usr/bin/gnome-desktop-testing-runner; then
|
|
CONFIGOPTS="${CONFIGOPTS} --enable-installed-tests=exclusive"
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
# TODO: Use some form of rpm's --build-in-place to skip archive-then-unpack?
|
|
make -f ${paprcidir}/Makefile.dist-packaging srpm PACKAGE=libostree DISTGIT_NAME=ostree
|
|
if test "$(id -u)" == 0; then
|
|
pkg_builddep *.src.rpm
|
|
else
|
|
echo "NOTE: Running as non-root, assuming build dependencies are installed"
|
|
fi
|
|
if ! ${paprcidir}/rpmbuild-cwd --rebuild *.src.rpm; then
|
|
find . -type f -name config.log -exec cat {} \;
|
|
exit 1
|
|
fi
|