3e9c6cf230
In #875 AKA b46fc35901
we
added support for the `releasever` option in treefiles. I am
pretty sure it worked at the time...but I didn't add tests.
Either it never worked or some refactoring broke it. The whole chain of
`GKeyFile` → `GVariant` is so confusing. Anyways fix it by copying the string.
Now let's use it by default in the compose tests, and while we're here bump
those to F27.
I'm doing this patch now as I was playing with doing a compose from
the `/usr/share/rpm-ostree/treefile.json` and wanted to use the stock
`.repo` files.
Closes: #1220
Approved by: jlebon
41 lines
1.2 KiB
Bash
Executable File
41 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Tests for `rpm-ostree ex container`.
|
|
set -xeuo pipefail
|
|
|
|
dn=$(cd $(dirname $0) && pwd)
|
|
export topsrcdir=$(cd $dn/.. && pwd)
|
|
. ${dn}/common/libtest-core.sh
|
|
. ${dn}/common/libcomposetest.sh
|
|
|
|
if test "$(id -u)" = 0; then
|
|
fatal "Don't run $0 as root"
|
|
fi
|
|
|
|
LOGDIR=${LOGDIR:-$(pwd)/ex-compose-logs}
|
|
|
|
tmpdir=$(mktemp -d /var/tmp/rpm-ostree-container.XXXXXX)
|
|
touch ${tmpdir}/.tmpdir
|
|
cleanup_tmp() {
|
|
# This sanity check ensures we don't delete something else
|
|
if test -z "${TEST_SKIP_CLEANUP:-}" && test -f ${tmpdir}/.tmpdir; then
|
|
rm -rf ${tmpdir}
|
|
fi
|
|
}
|
|
trap cleanup_tmp EXIT
|
|
|
|
cd ${tmpdir}
|
|
rpm-ostree ex container init
|
|
setup_rpmmd_repos ${tmpdir}/rpmmd.repos.d
|
|
|
|
echo "Results in ${LOGDIR}"
|
|
rm ${LOGDIR} -rf
|
|
mkdir -p ${LOGDIR}
|
|
|
|
# Ideally pass $(cwd) down into parallel somehow
|
|
export test_tmpdir=${tmpdir}
|
|
# We use -j 1 since we can't actually be parallel at the moment due
|
|
# to locking issues with metadata downloads at least. Down the line
|
|
# we should try to do a dry run pull first like the compose tests do.
|
|
ls ${dn}/ex-container-tests/test-*.sh | sort |
|
|
parallel -j 1 --tag --halt soon,fail=1 --joblog joblog --results ${LOGDIR} --line-buffer {}
|