mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-15 09:57:52 +03:00
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
51 lines
1.4 KiB
Bash
Executable File
51 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
# Build and run rpm-ostree's unit tests using the just-built ostree for this PR.
|
|
|
|
set -xeuo pipefail
|
|
|
|
# Frozen to a tag for now to help predictability; it's
|
|
# also useful to test building *older* versions since
|
|
# that must work.
|
|
RPMOSTREE_TAG=v2017.11
|
|
|
|
dn=$(dirname $0)
|
|
. ${dn}/libpaprci/libbuild.sh
|
|
|
|
codedir=$(pwd)
|
|
|
|
pkg_upgrade
|
|
pkg_install_buildroot
|
|
pkg_builddep ostree rpm-ostree
|
|
pkg_install rpm-ostree && rpm -e rpm-ostree
|
|
|
|
# Duplicate of deps from build.sh in rpm-ostree for tests
|
|
pkg_install ostree{,-devel,-grub2} createrepo_c /usr/bin/jq PyYAML \
|
|
libubsan libasan libtsan elfutils fuse sudo python-gobject-base \
|
|
selinux-policy-devel selinux-policy-targeted
|
|
# This one is in the papr.yml
|
|
pkg_install rsync
|
|
|
|
# build+install ostree
|
|
cd ${codedir}
|
|
build ${CONFIGOPTS:-}
|
|
make install
|
|
|
|
tmpd=$(mktemp -d)
|
|
cd ${tmpd}
|
|
git clone --recursive --depth=1 -b ${RPMOSTREE_TAG} https://github.com/projectatomic/rpm-ostree
|
|
cd rpm-ostree
|
|
build
|
|
# We want to capture automake results
|
|
cleanup() {
|
|
mv test-suite.log ${codedir} || true
|
|
}
|
|
trap cleanup EXIT
|
|
make -j 8 check
|
|
# Basic sanity test of rpm-ostree+new ostree by restarting rpm-ostreed
|
|
if ! make vmsync; then
|
|
ssh -o User=root vmcheck 'journalctl --no-pager | tail -1000'
|
|
fatal "vmsync failed"
|
|
fi
|
|
# Now run tests; just a subset ⊂ for now to avoid CI overload
|
|
make vmcheck TESTS="basic layering-basic"
|