summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2017-02-07 14:41:59 +0100
committerLinus Nordberg <linus@nordu.net>2017-02-07 14:41:59 +0100
commit71cc72d3c5e977355ebb0aa8bcb065a08207ec2f (patch)
tree1cdb0030b875fae416f45f138c4c85c58afa2ea2 /test
parent81292083fab81009ac9b1401947feefd094b9384 (diff)
Parallelised merge, sth phase.
Diffstat (limited to 'test')
-rwxr-xr-xtest/scripts/light-system-test-prepare-merge-takeover.sh4
-rwxr-xr-xtest/scripts/light-system-test-start.sh11
-rwxr-xr-xtest/scripts/light-system-test-stop.sh7
-rwxr-xr-xtest/scripts/light-system-test.sh7
-rw-r--r--test/scripts/testutils.sh4
5 files changed, 19 insertions, 14 deletions
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"
-}