From 71cc72d3c5e977355ebb0aa8bcb065a08207ec2f Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 7 Feb 2017 14:41:59 +0100 Subject: Parallelised merge, sth phase. --- test/scripts/light-system-test-prepare-merge-takeover.sh | 4 ++-- test/scripts/light-system-test-start.sh | 11 +++++++++-- test/scripts/light-system-test-stop.sh | 7 +++++-- test/scripts/light-system-test.sh | 7 +++---- test/scripts/testutils.sh | 4 ---- 5 files changed, 19 insertions(+), 14 deletions(-) (limited to 'test/scripts') diff --git a/test/scripts/light-system-test-prepare-merge-takeover.sh b/test/scripts/light-system-test-prepare-merge-takeover.sh index 67e5ac7..4b50ad7 100755 --- a/test/scripts/light-system-test-prepare-merge-takeover.sh +++ b/test/scripts/light-system-test-prepare-merge-takeover.sh @@ -9,8 +9,8 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd) mv mergedb mergedb-down mv mergedb-secondary mergedb -init_log -cp mergedb-down/sth mergedb/ # After init_log. +mv mergedb/verifiedsize mergedb/verifiedsize.OFF +cp mergedb-down/logorder mergedb/ mkdir mergedb-secondary touch mergedb-secondary/logorder printf 0 > mergedb-secondary/verifiedsize diff --git a/test/scripts/light-system-test-start.sh b/test/scripts/light-system-test-start.sh index 4520945..985a23c 100755 --- a/test/scripts/light-system-test-start.sh +++ b/test/scripts/light-system-test-start.sh @@ -14,8 +14,11 @@ start_node() { "exec ../bin/erl -boot ${node_app} -config ${node}" } -for node in ${ERLANGNODES}; do - start_node $(echo $node | tr ':' ' ') +for nodegroup in $SIGNINGNODES $MERGESECONDARYNODES $STORAGENODES $FRONTENDNODES; do + for node in $nodegroup; do + echo "starting $node" + start_node $(echo $node | tr ':' ' ') + done done for i in 1 2 3 4 5 6 7 8 9 10; do echo "waiting for system to start" @@ -37,3 +40,7 @@ for i in 1 2 3 4 5 6 7 8 9 10; do echo Not started: ${notstarted} fi done + +[ $# -gt 0 ] && [ "$1" = "initlog" ] && $top_srcdir/tools/initlog.py --config machine/merge/catlfish-test.cfg --localconfig machine/merge/catlfish-test-local-merge.cfg + +start_node $(echo ${MERGEPRIMARYNODE} | tr ':' ' ') diff --git a/test/scripts/light-system-test-stop.sh b/test/scripts/light-system-test-stop.sh index 0bf4374..2265a34 100755 --- a/test/scripts/light-system-test-stop.sh +++ b/test/scripts/light-system-test-stop.sh @@ -12,6 +12,9 @@ stop_node() { ${top_srcdir}/tools/to_catlfish.py to_erl nodes/${node}/ "init:stop()" } -for node in ${ERLANGNODES}; do - stop_node $(echo $node | tr ':' ' ') +for nodegroup in $FRONTENDNODES $MERGEPRIMARYNODE $STORAGENODES $MERGESECONDARYNODES $SIGNINGNODES; do + for node in $nodegroup; do + echo "starting $node" + stop_node $(echo $node | tr ':' ' ') + done done diff --git a/test/scripts/light-system-test.sh b/test/scripts/light-system-test.sh index 1f761e8..d2d242c 100755 --- a/test/scripts/light-system-test.sh +++ b/test/scripts/light-system-test.sh @@ -10,7 +10,7 @@ top_srcdir=$(cd $(dirname $0)/../..; pwd) SCRIPTS=${top_srcdir}/test/scripts tests_start() { - ${SCRIPTS}/light-system-test-start.sh + ${SCRIPTS}/light-system-test-start.sh $@ } tests_stop() { @@ -18,8 +18,7 @@ tests_stop() { } ${SCRIPTS}/light-system-test-prepare.sh -init_log -tests_start +tests_start initlog ${SCRIPTS}/light-system-test-run-1.sh || (echo "Tests failed"; sleep 5; tests_stop; false) sleep 5 tests_stop @@ -50,7 +49,7 @@ echo echo echo ${SCRIPTS}/light-system-test-prepare-merge-takeover.sh -tests_start +tests_start initlog ${SCRIPTS}/light-system-test-run-3.sh || (echo "Tests failed"; sleep 5; tests_stop; false) sleep 5 tests_stop diff --git a/test/scripts/testutils.sh b/test/scripts/testutils.sh index 657607b..88e9a54 100644 --- a/test/scripts/testutils.sh +++ b/test/scripts/testutils.sh @@ -47,7 +47,3 @@ do_merge() { sleep 1 done } - -init_log() { - ${top_srcdir}/tools/initlog.py --config ${top_srcdir}/test/catlfish-test.cfg --localconfig ${top_srcdir}/test/catlfish-test-local-merge.cfg || fail "Log init failed" -} -- cgit v1.1