diff options
author | Magnus Ahltorp <map@kth.se> | 2017-02-06 15:08:42 +0100 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2017-02-06 15:08:42 +0100 |
commit | 8c1e3ac28cbb902b540f776886a6556c40d3f601 (patch) | |
tree | 2e629effbfc5000c656b0fbe0389af56dbcfafff /test/scripts/testutils.sh | |
parent | 8a1f3a5f5b1458aceb7567add95e7637e9c2e5fc (diff) |
Wait for merge in tests
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() { |