From 4558ede163d97b6a744feefbd1184ed3b0c7d360 Mon Sep 17 00:00:00 2001 From: Magnus Ahltorp Date: Sat, 28 Feb 2015 17:32:05 +0100 Subject: Move test nodes list to variables --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b63a11f..5b2cf9e 100644 --- a/Makefile +++ b/Makefile @@ -44,19 +44,22 @@ tests-prepare: touch rel/tests/machine/machine-1/db/index touch rel/tests/machine/machine-1/db/newentries +NODES=frontend-1 storage-1 +TESTURLS=https://127.0.0.1:8080/ https://127.0.0.1:8081/ https://127.0.0.1:8082/ + tests-start: - @for node in frontend-1 storage-1; do \ + @for node in $(NODES); do \ (cd rel ; bin/run_erl -daemon ../test/nodes/$$node/ ../test/nodes/$$node/log/ "exec bin/erl -config $$node") \ done @for i in 1 2 3 4 5 6 7 8 9 10; do \ echo "waiting for system to start" ; \ sleep 0.5 ; \ allstarted=1 ; \ - for testurl in https://127.0.0.1:8080/ https://127.0.0.1:8081/ https://127.0.0.1:8082/; do \ + for testurl in $(TESTURLS); do \ if curl -s -k $$testurl > /dev/null ; then : ; else allstarted=0 ; fi ; \ : ; \ done ; \ - if [ $$allstarted == 1 ]; then break ; fi ; \ + if [ $$allstarted -eq 1 ]; then break ; fi ; \ done tests-run: @@ -64,7 +67,7 @@ tests-run: @(cd tools ; python fetchallcerts.py https://127.0.0.1:8080/) || echo "Verification failed" tests-stop: - @for node in frontend-1 storage-1; do \ + @for node in $(NODES); do \ ./tools/halt.py ./rel/bin/to_erl test/nodes/$$node/ ; \ done -- cgit v1.1