From 0a9f2460162b6b3e9fcf4e3b53c440a6cb73cfc9 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 19 Jan 2014 11:48:27 -0500 Subject: [PATCH] tests: Small tweaks to pull corruption test This one is failing here, I suspect it's the generic pull race condition, but these fixes should make it slightly more reliable. --- tests/pull-test.sh | 2 ++ tests/test-pull-corruption.sh | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/pull-test.sh b/tests/pull-test.sh index 5a96b087..82e70042 100755 --- a/tests/pull-test.sh +++ b/tests/pull-test.sh @@ -17,6 +17,8 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. +set -e + cd ${test_tmpdir} mkdir repo ${CMD_PREFIX} ostree --repo=repo init diff --git a/tests/test-pull-corruption.sh b/tests/test-pull-corruption.sh index 394a9e81..b042a0c0 100755 --- a/tests/test-pull-corruption.sh +++ b/tests/test-pull-corruption.sh @@ -39,7 +39,8 @@ do_corrupt_pull_test() { fi rm -rf ${repopath} cp -a ${repopath}.orig ${repopath} - if ${CMD_PREFIX} ostree --repo=repo pull origin main && ${CMD_PREFIX} ostree --repo=repo fsck; then + ${CMD_PREFIX} ostree --repo=repo pull origin main + if ${CMD_PREFIX} ostree --repo=repo fsck; then echo "ok pull with correct data worked" else assert_not_reached "pull with correct data failed!"