summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/scripts/light-system-test-run-1.sh10
-rwxr-xr-xtest/scripts/light-system-test-run-3.sh5
-rwxr-xr-xtest/scripts/light-system-test-run-4.sh3
-rwxr-xr-xtest/scripts/light-system-test-run-5.sh3
-rw-r--r--test/scripts/testutils.sh12
5 files changed, 21 insertions, 12 deletions
diff --git a/test/scripts/light-system-test-run-1.sh b/test/scripts/light-system-test-run-1.sh
index 1ad56a8..585a829 100755
--- a/test/scripts/light-system-test-run-1.sh
+++ b/test/scripts/light-system-test-run-1.sh
@@ -15,7 +15,7 @@ for certfile in ${top_srcdir}/tools/testcerts/cert[1-5].txt ${top_srcdir}/tools/
python ${top_srcdir}/tools/submitcert.py --parallel=1 --store $certfile --check-sct --sct-file=submittedcerts ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || fail "Submission failed"
done
python ${top_srcdir}/tools/storagegc.py --config machine/machine-1/catlfish-test.cfg --localconfig machine/machine-1/catlfish-test-local-1.cfg || fail "GC failed"
-do_merge
+do_merge 7
check_sth
assert_equal "Tree size" "$(get_treesize)" 7
@@ -36,10 +36,8 @@ ${top_srcdir}/tools/to_catlfish.py to_erl nodes/merge-2/ "init:stop()"
python ${top_srcdir}/tools/submitcert.py --parallel=1 --store ${top_srcdir}/tools/testcerts/cert6.txt --check-sct --sct-file=submittedcerts ${BASEURL} --publickey=keys/logkey.pem --cafile httpsca/demoCA/cacert.pem || fail "Submission failed"
echo NOTE: merge backup should fail with 111 Connection refused
-${top_srcdir}/tools/merge_fetch.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg || fail "Merge failed"
-${top_srcdir}/tools/merge_backup.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg && fail "Merge backup should have failed"
-${top_srcdir}/tools/merge_sth.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg || fail "Merge failed"
-${top_srcdir}/tools/merge_dist.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg || fail "Merge failed"
+do_merge 7
+sleep 3
assert_equal "Tree size" "$(get_treesize)" 7
@@ -50,7 +48,7 @@ for i in 1 2 3 4 5 6 7 8 9 10; do
sleep 0.5 ; \
if curl -s --cacert httpsca/demoCA/cacert.pem -4 https://localhost:8181 > /dev/null ; then break; fi
done
-do_merge
+do_merge 8
assert_equal "Tree size" "$(get_treesize)" 8
diff --git a/test/scripts/light-system-test-run-3.sh b/test/scripts/light-system-test-run-3.sh
index bb042d2..6071001 100755
--- a/test/scripts/light-system-test-run-3.sh
+++ b/test/scripts/light-system-test-run-3.sh
@@ -7,7 +7,8 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd)
. ${top_srcdir}/test/scripts/testutils.sh
-do_merge
+do_merge 8
+sleep 3
check_sth
assert_equal "Tree size" "$(get_treesize)" 8
@@ -16,7 +17,7 @@ python ${top_srcdir}/tools/submitcert.py --parallel=1 --store ${top_srcdir}/tool
assert_equal "Tree size" "$(get_treesize)" 8
-do_merge
+do_merge 9
assert_equal "Tree size" "$(get_treesize)" 9
diff --git a/test/scripts/light-system-test-run-4.sh b/test/scripts/light-system-test-run-4.sh
index a2490f9..51e1fc5 100755
--- a/test/scripts/light-system-test-run-4.sh
+++ b/test/scripts/light-system-test-run-4.sh
@@ -7,7 +7,8 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd)
. ${top_srcdir}/test/scripts/testutils.sh
-do_merge
+do_merge 9
+sleep 3
check_sth
assert_equal "Tree size" "$(get_treesize)" 9
diff --git a/test/scripts/light-system-test-run-5.sh b/test/scripts/light-system-test-run-5.sh
index 355e179..cf0bfaf 100755
--- a/test/scripts/light-system-test-run-5.sh
+++ b/test/scripts/light-system-test-run-5.sh
@@ -14,7 +14,8 @@ for machine in ${MACHINES}; do \
done
-do_merge
+do_merge 9
+sleep 3
check_sth
assert_equal "Tree size" "$(get_treesize)" 9
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() {