tests: Fix unnecessary rebuilds of the test platform

The code to use the pre-generated test platform was buggy so it wasn't
used. Also, generate a "stable" branch of it too as that is used
by test-run.sh.
This commit is contained in:
Alexander Larsson
2020-10-21 12:21:02 +02:00
committed by Alexander Larsson
parent 95ba6c77b4
commit 67d3443999
2 changed files with 2 additions and 1 deletions

View File

@@ -215,6 +215,7 @@ tests/test-%.wrap:
tests/runtime-repo: tests/make-test-runtime.sh flatpak
rm -rf tests/runtime-repo
PATH=$(abs_top_builddir):$${PATH} $(top_srcdir)/tests/make-test-runtime.sh tests/runtime-repo org.test.Platform master "" ""
PATH=$(abs_top_builddir):$${PATH} $(top_srcdir)/tests/make-test-runtime.sh tests/runtime-repo org.test.Platform stable "" ""
check_DATA += tests/runtime-repo

View File

@@ -275,7 +275,7 @@ make_runtime () {
RUNTIME_REF="runtime/org.test.Platform/$(flatpak --default-arch)/${BRANCH}"
if [ ! -z "${SRC_RUNTIME_REPO:-}" ]; then
RUNTIME_REPO=repos/${SRC_RUNTIME_REPO}
elif [ -f ${test_builddir}/runtime-repo/${RUNTIME_REF} ]; then
elif [ -f ${test_builddir}/runtime-repo/refs/heads/${RUNTIME_REF} ]; then
RUNTIME_REPO=${test_builddir}/runtime-repo
else
RUNTIME_REPO=${TEST_DATA_DIR}/runtime-repo