diff options
Diffstat (limited to 'test/scripts/testutils.sh')
-rw-r--r-- | test/scripts/testutils.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/scripts/testutils.sh b/test/scripts/testutils.sh index 731b6e5..d3a9672 100644 --- a/test/scripts/testutils.sh +++ b/test/scripts/testutils.sh @@ -36,8 +36,16 @@ check_sth_host() { } do_merge() { - ${top_srcdir}/tools/merge --config machine/merge/catlfish-test.cfg --timing --localconfig machine/merge/catlfish-test-local-merge.cfg || fail "Merge failed" - sleep 5 # FIXME: Just wait for dist instead. + n=15 + expected_treesize=$1 + while [ $n -gt 0 ]; do + ${top_srcdir}/tools/merge --config machine/merge/catlfish-test.cfg --timing --localconfig machine/merge/catlfish-test-local-merge.cfg || fail "Merge failed" + ${top_srcdir}/tools/mergestatus.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg + n=$((n-1)) + treesize=$(get_treesize) + [ "${treesize}" == "${expected_treesize}" ] && return + sleep 1 + done } init_log() { |