summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2014-10-24 17:22:30 +0200
committerMagnus Ahltorp <map@kth.se>2014-10-24 17:22:30 +0200
commit574f96fba9fd01ec9725c5509f02ad13d8ab8793 (patch)
tree4c401070fd9742e5970e5701a85a16eef8891dbd /Makefile
parentbda18b837a255aeb20366c736272698fa3223c4f (diff)
System tests for external merge
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index aa96290..66f575f 100644
--- a/Makefile
+++ b/Makefile
@@ -20,3 +20,36 @@ release:
printf "0" > rel/db/treesize
cp -r webroot rel/catlfish
test -d rel/catlfish/webroot/log || mkdir rel/catlfish/webroot/log
+
+tests-prepare:
+ -rm -r rel/known_roots
+ mkdir rel/known_roots
+ cp tools/testcerts/roots/* rel/known_roots
+
+ mkdir -p test/nodes/frontend-1/log
+ mkdir -p test/nodes/storage-1/log
+ mkdir -p test/nodes/storage-2/log
+ cp test/config/frontend-1.config rel
+ cp test/config/frontend-1-httpd.conf rel
+ cp test/config/storage-1.config rel
+ cp test/config/storage-1-httpd.conf rel
+ -rm -r rel/tests
+ mkdir -p rel/tests/machine/machine-1/db
+ printf "0" > rel/tests/machine/machine-1/db/treesize
+ mkdir -p rel/tests/machine/machine-2/db
+ printf "0" > rel/tests/machine/machine-2/db/treesize
+
+tests-start:
+ (cd rel ; bin/run_erl -daemon ../test/nodes/frontend-1/ ../test/nodes/frontend-1/log/ "exec bin/erl -config frontend-1 -name frontend-1")
+ (cd rel ; bin/run_erl -daemon ../test/nodes/storage-1/ ../test/nodes/storage-1/log/ "exec bin/erl -config storage-1 -name storage-1")
+ sleep 1
+
+tests-run:
+ (cd tools ; python testcase1.py ) || echo "Tests failed"
+
+tests-stop:
+ sleep 5
+ echo "halt()." | ./rel/bin/to_erl test/nodes/frontend-1/
+ echo "halt()." | ./rel/bin/to_erl test/nodes/storage-1/
+
+tests: tests-prepare tests-start tests-run tests-stop