Skip to content

Commit

Permalink
tests/compose: Add env variables to force caching and fast fail
Browse files Browse the repository at this point in the history
This helped me debug/fix the tests faster.

Closes: #959
Approved by: jlebon
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Sep 12, 2017
1 parent 3ff4858 commit 93d3fc6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/compose
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,13 @@ if [ -n "${RPMOSTREE_COMPOSE_TEST_USE_HOST_REPO:-}" ]; then
fi

# Delete the default ref, since we want to use subrefs of it
compose_prepargs=
if test -n "${RPMOSTREE_COMPOSE_CACHEONLY:-}"; then
compose_prepargs="--cache-only"
fi
(set -x
rm ${repobuild}/refs/heads/* -rf
rpm-ostree compose --repo=${repobuild} tree --dry-run --cachedir=${test_compose_datadir}/cache ${dn}/composedata/fedora-base.json
rpm-ostree compose --repo=${repobuild} tree --dry-run ${compose_prepargs} --cachedir=${test_compose_datadir}/cache ${dn}/composedata/fedora-base.json
rm ${repobuild}/refs/heads/* -rf) &>> ${LOG}

total=0
Expand Down Expand Up @@ -101,6 +105,9 @@ for tf in $(find ${dn}/compose-tests -name 'test-*.sh' | sort); do
fail_print "FAIL: $bn"
echo "FAIL" >> ${LOG}
let "fail += 1"
if test -n "${RPMOSTREE_COMPOSE_FASTFAIL:-}"; then
break;
fi
fi
fi
done
Expand Down

0 comments on commit 93d3fc6

Please sign in to comment.