Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 8098c33bd5
Fetching contributors…

Cannot retrieve contributors at this time

587 lines (527 sloc) 30.578 kb
# Copyright 2007-2011 Zuse Institute Berlin
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ERLC = @ERLC@
ERL = @ERL@
DIALYZER = @ERLANG_ROOT_DIR@/bin/dialyzer
ERL_LIB_DIR = @ERLANG_LIB_DIR@
SVN = svn
CD = cd
MAKE = make
VERSION=@PACKAGE_VERSION@
OTP_ERLANG_VERSION=1.5.4
COMMONS_CLI_VERSION=1.2
.PHONY: all compile test test-vts java java-test java-bench java-* python python-compile python-clean python-test python-bench python-doc-html python-doc-pdf python3 python3-convert python3-compile python3-clean python3-test python3-bench ruby-test interop-test clean docs svn dialyzer dialyzer-all rrd-init install install-all install-erlang install-java install-docs install-java-doc install-python-doc-html install-python-doc-pdf install-ruby install-python install-python3 test-clean %_SUITE %_SUITE-dialyzer
YAWS_PATH= /usr/local/lib/yaws
APP_NAME = @PACKAGE_TARNAME@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
VSN = $Id$
prefix = @prefix@
exec_prefix = @exec_prefix@
datarootdir = @datarootdir@
# /bin
BINDIR = $(DESTDIR)@bindir@
# /etc/scalaris/
ETCDIR = $(DESTDIR)@sysconfdir@/scalaris
# /lib/scalaris/
SCALARISDIR = $(DESTDIR)@libdir@/scalaris
# /lib/scalaris/ebin
BEAMDIR = $(DESTDIR)@libdir@/scalaris/ebin
# /lib/scalaris/docroot
DOCROOTDIR=$(SCALARISDIR)/docroot
# /share/doc/scalaris
DOCDIR=$(DESTDIR)@docdir@
# /share/java
JAVADIR=$(DESTDIR)@datarootdir@/java
# /var/log/scalaris
LOGDIR=$(DESTDIR)@localstatedir@/log/scalaris
# /usr/lib/ruby/site_ruby/1.8
RUBYSITELIBDIR=$(DESTDIR)@RUBYSITELIBDIR@
# /usr/lib/python2.7/site-packages
PYTHONSITELIBDIR=$(DESTDIR)@PYTHONSITELIBDIR@
# /usr/lib/python3.1/site-packages
PYTHON3SITELIBDIR=$(DESTDIR)@PYTHON3SITELIBDIR@
# paths of source files for make doc
SOURCEPATHS_ERL=src/* src/*/* include/* test/* contrib/log4erl/src/* contrib/yaws/src/*
# libraries needed to build a plt suitable for the dialyzer target
DIALYZER_PLT_LIBS=$(ERL_LIB_DIR)/common_test-*/ebin $(ERL_LIB_DIR)/compiler-*/ebin $(ERL_LIB_DIR)/crypto-*/ebin $(ERL_LIB_DIR)/debugger-*/ebin $(ERL_LIB_DIR)/edoc-*/ebin $(ERL_LIB_DIR)/erts-*/ebin $(ERL_LIB_DIR)/et-*/ebin $(ERL_LIB_DIR)/gs-*/ebin $(ERL_LIB_DIR)/hipe-*/ebin $(ERL_LIB_DIR)/inets-*/ebin $(ERL_LIB_DIR)/kernel-*/ebin $(ERL_LIB_DIR)/mnesia-*/ebin $(ERL_LIB_DIR)/observer-*/ebin $(ERL_LIB_DIR)/public_key-*/ebin/ $(ERL_LIB_DIR)/runtime_tools-*/ebin $(ERL_LIB_DIR)/sasl-*/ebin $(ERL_LIB_DIR)/snmp-*/ebin $(ERL_LIB_DIR)/ssh-*/ebin $(ERL_LIB_DIR)/ssl-*/ebin $(ERL_LIB_DIR)/stdlib-*/ebin $(ERL_LIB_DIR)/syntax_tools-*/ebin $(ERL_LIB_DIR)/test_server-*/ebin/ $(ERL_LIB_DIR)/tools-*/ebin $(ERL_LIB_DIR)/webtool-*/ebin $(ERL_LIB_DIR)/wx-*/ebin $(ERL_LIB_DIR)/xmerl-*/ebin contrib/log4erl/ebin contrib/yaws/ebin
#DIALYZER_PLT_LIBS=$(DIALYZER_PLT_LIBS) $(ERL_LIB_DIR)/gs-*/contribs/ebin $(ERL_LIB_DIR)/wx-*/examples/*
SCALARIS_CT_NAME ?= ct
# for java-test and java-bench:
SCALARIS_UNITTEST_PORT ?= 14194
SCALARIS_UNITTEST_YAWS_PORT ?= 8000
SCALARIS_JTEST_NAME ?= jtest_boot
all: compile
#all: compile dialyzer java test docs
#cp priv/xbin/*beam bin/
compile:
@$(ERL) -pa contrib/yaws -pa ebin -noinput +B -eval 'case make:all() of up_to_date -> halt(0); error -> halt(1) end.'
test-all: test java-test python-test interop-test db_verify_use_SUITE performance_SUITE benchmark_SUITE java-bench python-bench
test: compile
@RUN_TEST@ $(UNITTESTARGS) -name $(SCALARIS_CT_NAME) @ERLANG_TOKE_FLAGS@ -pa `pwd`/ebin `pwd`/contrib/yaws/ebin `pwd`/contrib/log4erl/ebin -spec test/scalaris.runtests-default.cfg | tee ct.log ; \
grep " 0 failed" ct.log
test-with-cover: compile
@RUN_TEST@ $(UNITTESTARGS) -name $(SCALARIS_CT_NAME) @ERLANG_TOKE_FLAGS@ -pa `pwd`/ebin `pwd`/contrib/yaws/ebin `pwd`/contrib/log4erl/ebin -spec test/scalaris.runtests-default.cfg -cover test/scalaris.coverspec | tee ct.log ; \
grep " 0 failed" ct.log
%_SUITE: compile
@RUN_TEST@ $(UNITTESTARGS) -name $(SCALARIS_CT_NAME)_$@ @ERLANG_TOKE_FLAGS@ -pa `pwd`/ebin `pwd`/contrib/yaws/ebin `pwd`/contrib/log4erl/ebin -suite $@ | tee ct.log ; \
grep " 0 failed" ct.log
test-vts: compile
@RUN_TEST@ @ERLANG_TOKE_FLAGS@ -pa `pwd`/ebin `pwd`/contrib/yaws/ebin `pwd`/contrib/log4erl/ebin -dir . -cover test/scalaris.coverspec -vts -browser @BROWSER@
test-clean:
-rm -rf ct_run.*@* ct.log index.html all_runs.html variables-*@* \
result_increment_10_1000.txt result_increment_1_10000.txt \
result_read_10_10000.txt result_read_1_100000.txt \
data/ct*@*
java:
ant -buildfile java-api/build.xml jar
java-test: compile java
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n $(SCALARIS_JTEST_NAME) -m -s -f start ; \
sleep 5s ; \
ant -Dscalaris.node="$(SCALARIS_JTEST_NAME)@localhost" -buildfile java-api/build.xml test ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/$(SCALARIS_JTEST_NAME)/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
java-bench: compile java
# replicas for key 0 in rt_chord: [0, 85070591730234615865843651857942052864, 170141183460469231731687303715884105728, 255211775190703847597530955573826158592]
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 0 -n "jbench_boot" \
-p $(SCALARIS_UNITTEST_PORT) -y $(SCALARIS_UNITTEST_YAWS_PORT) -m -s -f start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 85070591730234615865843651857942052864 -n "jbench_node1" \
-p $$(($(SCALARIS_UNITTEST_PORT)+1)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+1)) -s start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 170141183460469231731687303715884105728 -n "jbench_node2" \
-p $$(($(SCALARIS_UNITTEST_PORT)+2)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+2)) -s start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 255211775190703847597530955573826158592 -n "jbench_node3" \
-p $$(($(SCALARIS_UNITTEST_PORT)+3)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+3)) -s start ; \
sleep 5s ; \
SCALARIS_JAPI_NODE="jbench_boot@localhost" ./java-api/scalaris --noconfig -b $(SCALARIS_BENCHMARKS); \
./bin/scalarisctl -n "jbench_boot" stop ; \
./bin/scalarisctl -n "jbench_node1" stop ; \
./bin/scalarisctl -n "jbench_node2" stop ; \
./bin/scalarisctl -n "jbench_node3" stop ; \
true
java-%:
ant -buildfile java-api/build.xml $*
python: python-compile
python-compile:
python -mcompileall python-api
python -O -mcompileall python-api
python-clean:
rm -f python-api/*.py
rm -f python-api/*.pyc
rm -f python-api/*.pyo
python-test: compile python
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n $(SCALARIS_JTEST_NAME) -m -s -f start ; \
sleep 5s ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" python-api/scalaris_test.py ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/$(SCALARIS_JTEST_NAME)/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
python-bench: compile python
# replicas for key 0 in rt_chord: [0, 85070591730234615865843651857942052864, 170141183460469231731687303715884105728, 255211775190703847597530955573826158592]
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 0 -n "pbench_boot" \
-p $(SCALARIS_UNITTEST_PORT) -y $(SCALARIS_UNITTEST_YAWS_PORT) -m -s -f start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 85070591730234615865843651857942052864 -n "pbench_node1" \
-p $$(($(SCALARIS_UNITTEST_PORT)+1)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+1)) -s start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 170141183460469231731687303715884105728 -n "pbench_node2" \
-p $$(($(SCALARIS_UNITTEST_PORT)+2)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+2)) -s start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 255211775190703847597530955573826158592 -n "pbench_node3" \
-p $$(($(SCALARIS_UNITTEST_PORT)+3)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+3)) -s start ; \
sleep 5s ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" python-api/scalaris_bench.py $(SCALARIS_BENCHMARKS); \
./bin/scalarisctl -n "pbench_boot" stop ; \
./bin/scalarisctl -n "pbench_node1" stop ; \
./bin/scalarisctl -n "pbench_node2" stop ; \
./bin/scalarisctl -n "pbench_node3" stop ; \
true
python-doc-html:
cd python-api ; epydoc --config=epydoc.html.cfg ; FAILED=$$? ; cd .. ; \
if [ $$FAILED -ne 0 ]; then false ; else true ; fi
python-doc-pdf:
cd python-api ; epydoc --config=epydoc.pdf.cfg ; FAILED=$$? ; cd .. ; \
if [ $$FAILED -ne 0 ]; then false ; else true ; fi
python3: python3-compile
python3-convert: python3-clean
if [ ! -d python3-api ]; then \
mkdir -p python3-api ; \
fi
cp python-api/*.py python3-api/
cd python3-api && 2to3 -f all -f buffer -w -n . >/dev/null
sed -i -e "s|#!/usr/bin/python|#!/usr/bin/python3|g" python3-api/*.py
python3-compile: python3-convert
python3 -mcompileall python3-api
python3 -O -mcompileall python3-api
python3-clean:
if [ -d python3-api ]; then \
rm -f python3-api/*.py ; \
rm -f python3-api/*.pyc ; \
rm -f python3-api/*.pyo ; \
if [ -d python3-api/__pycache__ ]; then \
rm -f python3-api/__pycache__/*.py ; \
rm -f python3-api/__pycache__/*.pyc ; \
rm -f python3-api/__pycache__/*.pyo ; \
rmdir --ignore-fail-on-non-empty python3-api/__pycache__ ; \
fi ; \
rmdir --ignore-fail-on-non-empty python3-api/ ; \
fi
python3-test: compile python3
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n $(SCALARIS_JTEST_NAME) -m -s -f start ; \
sleep 5s ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" python3-api/scalaris_test.py ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/$(SCALARIS_JTEST_NAME)/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
python3-bench: compile python3
# replicas for key 0 in rt_chord: [0, 85070591730234615865843651857942052864, 170141183460469231731687303715884105728, 255211775190703847597530955573826158592]
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 0 -n "p3bench_boot" \
-p $(SCALARIS_UNITTEST_PORT) -y $(SCALARIS_UNITTEST_YAWS_PORT) -m -s -f start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 85070591730234615865843651857942052864 -n "p3bench_node1" \
-p $$(($(SCALARIS_UNITTEST_PORT)+1)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+1)) -s start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 170141183460469231731687303715884105728 -n "p3bench_node2" \
-p $$(($(SCALARIS_UNITTEST_PORT)+2)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+2)) -s start ; \
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_srver {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d -k 255211775190703847597530955573826158592 -n "p3bench_node3" \
-p $$(($(SCALARIS_UNITTEST_PORT)+3)) -y $$(($(SCALARIS_UNITTEST_YAWS_PORT)+3)) -s start ; \
sleep 5s ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" python3-api/scalaris_bench.py $(SCALARIS_BENCHMARKS); \
./bin/scalarisctl -n "p3bench_boot" stop ; \
./bin/scalarisctl -n "p3bench_node1" stop ; \
./bin/scalarisctl -n "p3bench_node2" stop ; \
./bin/scalarisctl -n "p3bench_node3" stop ; \
true
ruby-test: compile
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n $(SCALARIS_JTEST_NAME) -m -s -f start ; \
sleep 5s ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_test.rb ; \
FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
tail -n 50 log/$(SCALARIS_JTEST_NAME)/* ; \
echo "####################" ; \
false ; \
else \
true ; \
fi
interop-test: compile java java-scalaris.test.compile python
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n $(SCALARIS_JTEST_NAME) -m -s -f start ; \
sleep 5s ; \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)@localhost" de.zib.scalaris.InterOpTest -write interop_test > log/$(SCALARIS_JTEST_NAME)/interop.java_write.log 2>&1; \
JAVA_WRITE_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python-api/scalaris_interop_test.py write interop_test > log/$(SCALARIS_JTEST_NAME)/interop.python_write.log 2>&1 ; \
PYTHON_JSON_WRITE_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb write interop_test > log/$(SCALARIS_JTEST_NAME)/interop.ruby_write.log 2>&1 ; \
RUBY_JSON_WRITE_FAILED=$$? ; \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)@localhost" de.zib.scalaris.InterOpTest -read interop_test java > log/$(SCALARIS_JTEST_NAME)/interop.java_read_java.log 2>&1 ; \
JAVA_READ_JAVA_FAILED=$$? ; \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)@localhost" de.zib.scalaris.InterOpTest -read interop_test json_python > log/$(SCALARIS_JTEST_NAME)/interop.java_read_python.log 2>&1 ; \
JAVA_READ_PYTHON_JSON_FAILED=$$? ; \
java -cp "java-api/scalaris.jar:java-api/lib/jakarta-commons-cli-1.2.jar:java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar:java-api/classes" -Dscalaris.node="$(SCALARIS_JTEST_NAME)@localhost" de.zib.scalaris.InterOpTest -read interop_test json_ruby > log/$(SCALARIS_JTEST_NAME)/interop.java_read_ruby.log 2>&1 ; \
JAVA_READ_RUBY_JSON_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python-api/scalaris_interop_test.py read interop_test java > log/$(SCALARIS_JTEST_NAME)/interop.python_read_java.log 2>&1 ; \
PYTHON_JSON_READ_JAVA_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python-api/scalaris_interop_test.py read interop_test json_python > log/$(SCALARIS_JTEST_NAME)/interop.python_read_python.log 2>&1 ; \
PYTHON_JSON_READ_PYTHON_JSON_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python-api/scalaris_interop_test.py read interop_test json_ruby > log/$(SCALARIS_JTEST_NAME)/interop.python_read_ruby.log 2>&1 ; \
PYTHON_JSON_READ_RUBY_JSON_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb read interop_test java > log/$(SCALARIS_JTEST_NAME)/interop.ruby_read_java.log 2>&1 ; \
RUBY_JSON_READ_JAVA_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb read interop_test json_python > log/$(SCALARIS_JTEST_NAME)/interop.ruby_read_python.log 2>&1 ; \
RUBY_JSON_READ_PYTHON_JSON_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" ruby-api/scalaris_interop_test.rb read interop_test json_ruby > log/$(SCALARIS_JTEST_NAME)/interop.ruby_read_ruby.log 2>&1 ; \
RUBY_JSON_READ_RUBY_JSON_FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ $$JAVA_WRITE_FAILED -ne 0 -o $$PYTHON_JSON_WRITE_FAILED -ne 0 -o $$RUBY_JSON_WRITE_FAILED -ne 0 -o $$JAVA_READ_JAVA_FAILED -ne 0 -o $$JAVA_READ_PYTHON_JSON_FAILED -ne 0 -o $$JAVA_READ_RUBY_JSON_FAILED -ne 0 -o $$PYTHON_JSON_READ_JAVA_FAILED -ne 0 -o $$PYTHON_JSON_READ_PYTHON_JSON_FAILED -ne 0 -o $$PYTHON_JSON_READ_RUBY_JSON_FAILED -ne 0 -o $$RUBY_JSON_READ_JAVA_FAILED -ne 0 -o $$RUBY_JSON_READ_PYTHON_JSON_FAILED -ne 0 -o $$RUBY_JSON_READ_RUBY_JSON_FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
cat log/$(SCALARIS_JTEST_NAME)/interop.*write*.log ; \
cat log/$(SCALARIS_JTEST_NAME)/interop.*read*.log ; \
echo "####################" ; \
tail -n 50 log/$(SCALARIS_JTEST_NAME)/* ; \
echo "####################" ; \
false ; \
else \
echo "all tests successful" ; \
true ; \
fi
# only test whether python2 and python3 read/write the same values - the rest is checked by interop-test
interop3-test: interop-test python3
SCALARIS_ADDITIONAL_PARAMETERS="-scalaris mgmt_server {{127,0,0,1},$(SCALARIS_UNITTEST_PORT),mgmt_server} -scalaris known_hosts [{{127,0,0,1},$(SCALARIS_UNITTEST_PORT),service_per_vm}]" \
./bin/scalarisctl -d \
-y $(SCALARIS_UNITTEST_YAWS_PORT) \
-p $(SCALARIS_UNITTEST_PORT) \
-n $(SCALARIS_JTEST_NAME) -m -s -f start ; \
sleep 5s ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python-api/scalaris_interop_test.py write interop_test > log/$(SCALARIS_JTEST_NAME)/interop.python_write.log 2>&1 ; \
PYTHON_JSON_WRITE_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python3-api/scalaris_interop_test.py write interop_test3 > log/$(SCALARIS_JTEST_NAME)/interop.python3_write.log 2>&1 ; \
PYTHON3_JSON_WRITE_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python-api/scalaris_interop_test.py read interop_test json_python > log/$(SCALARIS_JTEST_NAME)/interop.python_read_python.log 2>&1 ; \
PYTHON_JSON_READ_PYTHON_JSON_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python-api/scalaris_interop_test.py read interop_test3 json_python > log/$(SCALARIS_JTEST_NAME)/interop.python_read_python3.log 2>&1 ; \
PYTHON_JSON_READ_PYTHON3_JSON_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python3-api/scalaris_interop_test.py read interop_test json_python > log/$(SCALARIS_JTEST_NAME)/interop.python3_read_python.log 2>&1 ; \
PYTHON3_JSON_READ_PYTHON_JSON_FAILED=$$? ; \
SCALARIS_JSON_URL="http://localhost:$(SCALARIS_UNITTEST_YAWS_PORT)" PYTHONIOENCODING="utf_8" python3-api/scalaris_interop_test.py read interop_test3 json_python > log/$(SCALARIS_JTEST_NAME)/interop.python3_read_python3.log 2>&1 ; \
PYTHON3_JSON_READ_PYTHON3_JSON_FAILED=$$? ; \
./bin/scalarisctl -n "$(SCALARIS_JTEST_NAME)" stop ; \
if [ -o $$PYTHON_JSON_WRITE_FAILED -ne 0 -o $$PYTHON3_JSON_WRITE_FAILED -ne 0 -o $$PYTHON_JSON_READ_PYTHON_JSON_FAILED -ne 0 -o $$PYTHON_JSON_READ_PYTHON3_JSON_FAILED -ne 0 -o $$PYTHON3_JSON_READ_PYTHON_JSON_FAILED -ne 0 -o $$PYTHON3_JSON_READ_PYTHON3_JSON_FAILED -ne 0 ]; then \
echo "####################" ; \
echo "Erlang messages (last 50 per log file):" ; \
echo "####################" ; \
cat log/$(SCALARIS_JTEST_NAME)/interop.*write*.log ; \
cat log/$(SCALARIS_JTEST_NAME)/interop.*read*.log ; \
echo "####################" ; \
tail -n 50 log/$(SCALARIS_JTEST_NAME)/* ; \
echo "####################" ; \
false ; \
else \
echo "all tests successful" ; \
true ; \
fi
clean:
-rm -f .make-doc
-rm -rf bin/*.beam
-rm -rf ebin/*.beam
-rm -rf src/*.beam
-rm -rf src/comm_layer/*.beam
-rm -rf contrib/yaws/ebin/*.beam
-rm -rf contrib/log4erl/ebin/*.beam
-rm -rf test/*.beam
-rm -rf doc/*.html
-rm -rf doc/*.css
-rm -rf doc/edoc-info
-rm -rf docroot/graphs/*.png
doc: .make-doc
.make-doc: $(SOURCEPATHS_ERL)
$(ERL) -noshell -run edoc_run application "'$(APP_NAME)'" \
'"."' '[{def,{vsn,"$(VSN)"}},no_packages]'
@touch .make-doc
docs: doc java-doc
svn:
$(SVN) propset svn:keywords Id src/*.erl src/*/*.erl test/*.erl bin/*.cfg
dialyzer: compile
$(DIALYZER) @DIALYZER_FLAGS@ -Werror_handling -Wrace_conditions -Wunmatched_returns -I include/ -I contrib/yaws/include/ -I contrib/log4erl/include/ --src -c src src/*/ test/unittest_helper.erl test/tester*.erl test/mockup*.erl test/erl_id_trans.erl test/measure_util.erl --no_native | sed -f contrib/dialyzer-col.sed
dialyzer-all: compile
$(DIALYZER) @DIALYZER_FLAGS@ -Werror_handling -Wrace_conditions -Wunmatched_returns -Wno_return -Wno_opaque -I include/ -I contrib/yaws/include/ -I contrib/log4erl/include/ --src -c src src/*/ test | sed -f contrib/dialyzer-col.sed
%_SUITE-dialyzer: compile
$(DIALYZER) @DIALYZER_FLAGS@ -Werror_handling -Wrace_conditions -Wunmatched_returns -Wno_return -Wno_opaque -I include/ -I contrib/yaws/include/ -I contrib/log4erl/include/ --src -c src src/*/ test/unittest_helper.erl test/tester*.erl test/erl_id_trans.erl test/measure_util.erl test/$*_SUITE.erl --no_native | sed -f contrib/dialyzer-col.sed
plt: compile
$(DIALYZER) --plt_info > /dev/null ; \
FAILED=$$? ; \
if [ $$FAILED -ne 0 ]; then \
$(DIALYZER) --build_plt $(DIALYZER_PLT_LIBS) ; \
else \
$(DIALYZER) --add_to_plt $(DIALYZER_PLT_LIBS) ; \
fi
rrd-init:
@echo This target is deprecated
install-doc: doc
install -d $(DOCDIR)
install -m 644 -t $(DOCDIR) \
AUTHORS README LICENSE ChangeLog
install -m 644 user-dev-guide/main.pdf $(DOCDIR)/user-dev-guide.pdf
install -d $(DOCDIR)/erlang
install -m 644 -t $(DOCDIR)/erlang \
doc/*.html \
doc/*.png
install-java-doc: java-doc
install -d $(DOCDIR)/java-api
install -d $(DOCDIR)/java-api/index-files
install -d $(DOCDIR)/java-api/resources
install -d $(DOCDIR)/java-api/de/zib/scalaris/class-use
install -d $(DOCDIR)/java-api/de/zib/scalaris/examples/class-use
install -m 644 -t $(DOCDIR)/java-api \
java-api/doc/*.html
install -m 644 -t $(DOCDIR)/java-api/index-files \
java-api/doc/index-files/*.html
install -m 644 -t $(DOCDIR)/java-api/resources \
java-api/doc/resources/*.gif
install -m 644 -t $(DOCDIR)/java-api/de/zib/scalaris \
java-api/doc/de/zib/scalaris/*.html
install -m 644 -t $(DOCDIR)/java-api/de/zib/scalaris/class-use \
java-api/doc/de/zib/scalaris/class-use/*.html
install -m 644 -t $(DOCDIR)/java-api/de/zib/scalaris/examples \
java-api/doc/de/zib/scalaris/examples/*.html
install -m 644 -t $(DOCDIR)/java-api/de/zib/scalaris/examples/class-use \
java-api/doc/de/zib/scalaris/examples/class-use/*.html
install-python-doc-html: python-doc-html
install -d $(DOCDIR)/python-api
install -d $(DOCDIR)/python-api/html
install -m 644 -t $(DOCDIR)/python-api/html \
python-api/doc/html/*
install-python-doc-pdf: python-doc-pdf
install -d $(DOCDIR)/python-api
install -d $(DOCDIR)/python-api/pdf
install -m 644 -t $(DOCDIR)/python-api/pdf \
python-api/doc/pdf/*.pdf
install-docs: install-doc install-java-doc
install-java: java
install -d $(JAVADIR)/scalaris
install -d $(JAVADIR)/scalaris/lib
install -m 644 -t $(JAVADIR)/scalaris \
java-api/scalaris.jar
install -m 644 -t $(JAVADIR)/scalaris/lib \
java-api/lib/OtpErlang-$(OTP_ERLANG_VERSION).jar
install -m 644 -t $(JAVADIR)/scalaris/lib \
java-api/lib/jakarta-commons-cli-$(COMMONS_CLI_VERSION).jar
install -d $(ETCDIR)
install -m 644 java-api/scalaris-java.conf \
$(ETCDIR)/scalaris-java.conf
install -m 644 -t $(ETCDIR) \
java-api/scalaris-java.conf.sample
install -m 644 -t $(ETCDIR) \
java-api/scalaris.properties
install -d $(BINDIR)
install -m 755 -t $(BINDIR) \
java-api/scalaris
install-erlang: compile
install -d $(BEAMDIR)
install -m 644 -t $(BEAMDIR) \
ebin/*.beam
install -d $(ETCDIR)
install -m 644 -t $(ETCDIR) \
bin/scalarisctl.conf \
bin/scalaris.cfg \
bin/scalaris.local.cfg.example
if [ -f bin/scalaris.local.cfg ]; then \
install -m 644 -t $(ETCDIR) \
bin/scalaris.local.cfg; \
else \
touch $(ETCDIR)/scalaris.local.cfg ; \
fi
install -d $(DOCROOTDIR) \
$(DOCROOTDIR)/icons \
$(DOCROOTDIR)/images/default \
$(DOCROOTDIR)/images/default/dd \
$(DOCROOTDIR)/images/default/panel \
$(DOCROOTDIR)/images/default/tree \
$(DOCROOTDIR)/images/default/grid
install -m 644 -t $(DOCROOTDIR) \
docroot/*.yaws \
docroot/*.css \
docroot/*.js \
docroot/*.gif
install -m 644 -t $(DOCROOTDIR)/icons \
docroot/icons/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/dd \
docroot/images/default/dd/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/panel \
docroot/images/default/panel/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/panel \
docroot/images/default/panel/*.png
install -m 644 -t $(DOCROOTDIR)/images/default/tree \
docroot/images/default/tree/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/grid \
docroot/images/default/grid/*.gif
install -m 644 -t $(DOCROOTDIR)/images/default/grid \
docroot/images/default/grid/*.png
install -d $(SCALARISDIR)/contrib/yaws/ebin
install -d $(SCALARISDIR)/contrib/yaws/include
install -m 644 -t $(SCALARISDIR)/contrib/yaws/ebin \
contrib/yaws/ebin/*.beam
install -m 644 -t $(SCALARISDIR)/contrib/yaws/include \
contrib/yaws/include/yaws_api.hrl
install -d $(SCALARISDIR)/contrib/log4erl/ebin
install -m 644 -t $(SCALARISDIR)/contrib/log4erl/ebin \
contrib/log4erl/ebin/*.beam
install -d $(LOGDIR)
install -d $(BINDIR)
install -m 755 -t $(BINDIR) \
bin/scalarisctl
install-ruby:
install -d $(RUBYSITELIBDIR)
install -m 644 -t $(RUBYSITELIBDIR) ruby-api/scalaris.rb
install -d $(BINDIR)
install -m 755 ruby-api/scalaris_client.rb $(BINDIR)/scalaris-ruby
install-python: python
install -d $(PYTHONSITELIBDIR)
install -m 644 -p -t $(PYTHONSITELIBDIR) python-api/scalaris.py*
install -m 644 -p -t $(PYTHONSITELIBDIR) python-api/scalaris_bench.py*
install -d $(BINDIR)
install -m 755 -p python-api/scalaris_client.py $(BINDIR)/scalaris-python
install-python3: python3
install -d $(PYTHON3SITELIBDIR)
install -m 644 -p -t $(PYTHON3SITELIBDIR) python3-api/scalaris.py*
install -m 644 -p -t $(PYTHON3SITELIBDIR) python3-api/scalaris_bench.py*
if [ -d python3-api/__pycache__ ]; then \
install -d $(PYTHON3SITELIBDIR)/__pycache__ ; \
install -m 644 -p -t $(PYTHON3SITELIBDIR)/__pycache__ \
python3-api/__pycache__/scalaris.*.py*; \
install -m 644 -p -t $(PYTHON3SITELIBDIR)/__pycache__ \
python3-api/__pycache__/scalaris_bench.*.py*; \
fi
install -d $(BINDIR)
install -m 755 -p python3-api/scalaris_client.py $(BINDIR)/scalaris-python3
install: install-erlang
install-all: install-erlang install-java install-docs @ENABLERUBYINSTALL@ @ENABLEPYTHONINSTALL@ @ENABLEPYTHON3INSTALL@
Jump to Line
Something went wrong with that request. Please try again.