mirror of https://gitee.com/bigwinds/arangodb
995 lines
52 KiB
Makefile
Executable File
995 lines
52 KiB
Makefile
Executable File
# -*- mode: Makefile; -*-
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- CONFIGURATION
|
|
## -----------------------------------------------------------------------------
|
|
|
|
FORCE = 0
|
|
SKIP_BOOST = 0
|
|
SKIP_GEO = 0
|
|
SKIP_AHUACATL = 0
|
|
SKIP_RANGES = 0
|
|
VALGRIND =
|
|
USERNAME = root
|
|
PASSWORD =
|
|
PROTO = http
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- UNITTESTS
|
|
## -----------------------------------------------------------------------------
|
|
|
|
################################################################################
|
|
### @brief unittests target
|
|
################################################################################
|
|
|
|
.PHONY: unittests unittests-brief unittests-verbose
|
|
|
|
unittests: all unittests-verbose unittests-brief
|
|
|
|
unittests-brief: \
|
|
unittests-make \
|
|
unittests-codebase-static \
|
|
unittests-config \
|
|
unittests-boost \
|
|
unittests-shell-server \
|
|
unittests-shell-server-ahuacatl \
|
|
unittests-http-server \
|
|
unittests-ssl-server \
|
|
unittests-shell-client \
|
|
unittests-dump \
|
|
unittests-arangob \
|
|
unittests-import \
|
|
unittests-upgrade \
|
|
unittests-dfdb \
|
|
unittests-foxx-manager \
|
|
unittests-authentication \
|
|
unittests-authentication-parameters
|
|
|
|
unittests-verbose:
|
|
@echo "################################################################################"
|
|
@echo "## ##"
|
|
@echo "## ArangoDB Unit-Tests ##"
|
|
@echo "## ##"
|
|
@echo "## > make unittests ##"
|
|
@echo "## > make unittests FORCE=1 ##"
|
|
@echo "## > make unittests SKIP_BOOST=1 ##"
|
|
@echo "## > make unittests SKIP_GEO=1 ##"
|
|
@echo "## > make unittests SKIP_AHUACATL=1 ##"
|
|
@echo "## > make unittests SKIP_RANGES=1 ##"
|
|
@echo "## > make unittests VALGRIND=valgrind ##"
|
|
@echo "## ##"
|
|
@echo "################################################################################"
|
|
@echo
|
|
|
|
@sleep 1
|
|
|
|
################################################################################
|
|
### @brief single test
|
|
################################################################################
|
|
|
|
TEST := $(shell echo $$TEST)
|
|
|
|
################################################################################
|
|
### @brief arango server configuration
|
|
################################################################################
|
|
|
|
PID := $(shell echo $$PPID)
|
|
|
|
PIDFILE := /tmp/arango.$(PID).pid
|
|
VOCDIR := /tmp/vocdir.$(PID)
|
|
VOCPORT := $(shell printf "3%04d" `expr $(PID) % 10000`)
|
|
VOCHOST := 127.0.0.1
|
|
STARTFILE := $(VOCDIR)/startup
|
|
|
|
################################################################################
|
|
### @brief slave stuff
|
|
################################################################################
|
|
|
|
SLAVEPIDFILE := /tmp/arango-slave.$(PID).pid
|
|
SLAVEPORT := $(shell printf "4%04d" `expr $(PID) % 10000`)
|
|
SLAVEHOST := 127.0.0.1
|
|
SLAVEDIR := /tmp/vocdir-slave.$(PID)
|
|
SLAVESTARTFILE := $(SLAVEDIR)/startup
|
|
|
|
################################################################################
|
|
### @brief client configuration
|
|
################################################################################
|
|
|
|
CURL := curl
|
|
CURL_OPT := --basic --user "$(USERNAME):$(PASSWORD)"
|
|
CERT_FILE := @top_srcdir@/UnitTests/server.pem
|
|
|
|
################################################################################
|
|
### @brief start the arango server
|
|
################################################################################
|
|
|
|
SERVER_START :=
|
|
|
|
SERVER_OPT := \
|
|
--configuration none \
|
|
--database.maximal-journal-size 1048576 \
|
|
--database.force-sync-properties false \
|
|
--javascript.app-path @top_srcdir@/js/apps \
|
|
--javascript.gc-interval 1 \
|
|
--javascript.startup-directory @top_srcdir@/js \
|
|
--log.file "" \
|
|
--ruby.action-directory @top_srcdir@/mr/actions \
|
|
--ruby.modules-path @top_srcdir@/mr/server/modules:@top_srcdir@/mr/common/modules \
|
|
--server.threads 4 \
|
|
$(SERVER_START)
|
|
|
|
CLIENT_OPT := \
|
|
--configuration none \
|
|
--javascript.startup-directory @top_srcdir@/js \
|
|
--no-colors \
|
|
--quiet
|
|
|
|
.PHONY: start-server
|
|
|
|
start-server:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@(test "$(PROTO)" == "http" && echo "<< STARTING SERVER ON TCP ENDPOINT >>") || true
|
|
@(test "$(PROTO)" == "https" && echo "<< STARTING SERVER ON SSL ENDPOINT >>") || true
|
|
@(test "$(PROTO)" == "unix" && echo "<< STARTING SERVER ON UNIX SOCKET ENDPOINT >>") || true
|
|
@echo "================================================================================"
|
|
@echo
|
|
@echo "Server Options: $(SERVER_OPT)"
|
|
@echo
|
|
|
|
@rm -f "$(PIDFILE)"
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
|
|
@test -d "$(VOCDIR)"
|
|
|
|
($(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --pid-file $(PIDFILE) --watch-process $(PID) && rm -rf "$(VOCDIR)") &
|
|
|
|
@test "$(PROTO)" == "unix" || (rm -f "$(STARTFILE)"; while [ ! -s "$(STARTFILE)" ]; do $(CURL) $(CURL_OPT) --insecure -X GET -s "$(PROTO)://$(VOCHOST):$(VOCPORT)/_api/version" > "$(STARTFILE)" || sleep 2; done)
|
|
@(test "$(PROTO)" == "unix" && sleep 5) || true
|
|
@rm -f "$(STARTFILE)"
|
|
@echo "server has been started."
|
|
@if [ "$(VALGRIND)" != "" ]; then echo "adding valgrind memorial time..."; sleep 75; else sleep 2; fi
|
|
@echo
|
|
|
|
|
|
.PHONY: start-slave
|
|
|
|
start-slave:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< STARTING SLAVE >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
@echo "Slave Options: $(SERVER_OPT)"
|
|
@echo
|
|
|
|
@rm -f "$(SLAVEPIDFILE)"
|
|
@rm -rf "$(SLAVEDIR)"
|
|
@mkdir -p "$(SLAVEDIR)/databases"
|
|
|
|
@test -d "$(SLAVEDIR)"
|
|
|
|
($(VALGRIND) @builddir@/bin/arangod "$(SLAVEDIR)" $(SERVER_OPT) --pid-file $(SLAVEPIDFILE) --watch-process $(PID) && rm -rf "$(SLAVEDIR)") &
|
|
|
|
@rm -f "$(SLAVESTARTFILE)"; while [ ! -s "$(SLAVESTARTFILE)" ]; do $(CURL) $(CURL_OPT) -X GET -s "$(PROTO)://$(SLAVEHOST):$(SLAVEPORT)/_api/version" > "$(SLAVESTARTFILE)" || sleep 2; done
|
|
@rm -f "$(SLAVESTARTFILE)"
|
|
@echo "slave has been started."
|
|
@if [ "$(VALGRIND)" != "" ]; then echo "adding valgrind memorial time..."; sleep 75; else sleep 2; fi
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief issue a curl request and return the status
|
|
################################################################################
|
|
|
|
.PHONY: curl-request-get
|
|
|
|
curl-request-get:
|
|
@declare -x ACTUAL=$$(curl --dump - -X GET "$(CURL_PROTO)://$(CURL_HOST):$(CURL_PORT)$(CURL_URL)" 2> /dev/null | head -n 1 | tr "\r" " " | sed -e 's/^HTTP\/1\.1 \([0-9]*\).*$$/\1/g'); if [ "x$$ACTUAL" != "x$(EXPECTED)" ]; then echo "request to $(CURL_PROTO)://$(CURL_HOST):$(CURL_PORT)$(CURL_URL) returned $$ACTUAL, expected: $(EXPECTED)"; false; else true; fi
|
|
|
|
################################################################################
|
|
### @brief COMMON MAKE-RELATED TESTS
|
|
################################################################################
|
|
|
|
.PHONY: unittests-make
|
|
|
|
unittests-make:
|
|
@(ctags --version > /dev/null 2> /dev/null && make tags > /dev/null || test "x$(FORCE)" == "x1") || true
|
|
|
|
################################################################################
|
|
### @brief static codebase tests (a.k.a. Visual Studio cries)
|
|
################################################################################
|
|
|
|
.PHONY: unittests-codebase-static
|
|
|
|
unittests-codebase-static:
|
|
@rm -f duplicates.test
|
|
@(find lib arangosh arangod arangoirb -regex ".*/.*\.\(c\|h\|cpp\)" -print | cut -d "/" -f2-9 | tr "[:upper:]" "[:lower:]" | sort | uniq -c | grep -v "^ \+1 \+" > duplicates.test) || true
|
|
@if [ "`grep " " duplicates.test`" != "" ]; then echo ; echo "Duplicate filenames found. These should be fixed to allow compilation with Visual Studio:"; cat duplicates.test; rm -f duplicates.test; false; fi
|
|
@rm -f duplicates.test
|
|
|
|
################################################################################
|
|
### @brief test configuration files
|
|
################################################################################
|
|
|
|
.PHONY: unittests-config
|
|
|
|
unittests-config:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< CONFIGURATION FILE TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@builddir@/bin/arangod --configuration @builddir@/etc/arangodb/arangod.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangob --configuration @builddir@/etc/arangodb/arangob.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangodump --configuration @builddir@/etc/arangodb/arangodump.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangoimp --configuration @builddir@/etc/arangodb/arangoimp.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangorestore --configuration @builddir@/etc/arangodb/arangorestore.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangosh --configuration @builddir@/etc/arangodb/arangosh.conf --help 1> /dev/null || false
|
|
|
|
@builddir@/bin/arangod --configuration @builddir@/etc/relative/arangod.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangob --configuration @builddir@/etc/relative/arangob.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangodump --configuration @builddir@/etc/relative/arangodump.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangoimp --configuration @builddir@/etc/relative/arangoimp.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangorestore --configuration @builddir@/etc/relative/arangorestore.conf --help 1> /dev/null || false
|
|
@builddir@/bin/arangosh --configuration @builddir@/etc/relative/arangosh.conf --help 1> /dev/null || false
|
|
|
|
################################################################################
|
|
### @brief BOOST TESTS
|
|
################################################################################
|
|
|
|
.PHONY: unittests-boost
|
|
|
|
if ENABLE_MAINTAINER_MODE
|
|
|
|
unittests-boost: UnitTests/basics_suite UnitTests/geo_suite
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< BOOST TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
test "x$(SKIP_BOOST)" == "x1" || $(VALGRIND) @builddir@/UnitTests/basics_suite --show_progress || test "x$(FORCE)" == "x1"
|
|
test "x$(SKIP_GEO)" == "x1" || $(VALGRIND) @builddir@/UnitTests/geo_suite --show_progress || test "x$(FORCE)" == "x1"
|
|
|
|
@echo
|
|
|
|
noinst_PROGRAMS += UnitTests/basics_suite UnitTests/geo_suite
|
|
|
|
UnitTests_basics_suite_CPPFLAGS = -I@top_srcdir@/arangod -I@top_srcdir@/lib @ICU_CPPFLAGS@
|
|
UnitTests_basics_suite_LDADD = -L@top_builddir@/lib -larango -lboost_unit_test_framework @ICU_LDFLAGS@
|
|
UnitTests_basics_suite_DEPENDENCIES = @top_builddir@/lib/libarango.a
|
|
|
|
UnitTests_basics_suite_SOURCES = \
|
|
UnitTests/Basics/Runner.cpp \
|
|
UnitTests/Basics/conversions-test.cpp \
|
|
UnitTests/Basics/csv-test.cpp \
|
|
UnitTests/Basics/files-test.cpp \
|
|
UnitTests/Basics/json-test.cpp \
|
|
UnitTests/Basics/json-utilities-test.cpp \
|
|
UnitTests/Basics/hashes-test.cpp \
|
|
UnitTests/Basics/mersenne-test.cpp \
|
|
UnitTests/Basics/associative-pointer-test.cpp \
|
|
UnitTests/Basics/associative-synced-test.cpp \
|
|
UnitTests/Basics/string-buffer-test.cpp \
|
|
UnitTests/Basics/string-utf8-normalize-test.cpp \
|
|
UnitTests/Basics/string-utf8-test.cpp \
|
|
UnitTests/Basics/string-test.cpp \
|
|
UnitTests/Basics/structure-size-test.cpp \
|
|
UnitTests/Basics/vector-pointer-test.cpp \
|
|
UnitTests/Basics/vector-test.cpp \
|
|
UnitTests/Basics/EndpointTest.cpp \
|
|
UnitTests/Basics/StringBufferTest.cpp \
|
|
UnitTests/Basics/StringUtilsTest.cpp
|
|
|
|
UnitTests_geo_suite_CPPFLAGS = -I@top_srcdir@/arangod -I@top_builddir@/lib -I@top_srcdir@/lib
|
|
UnitTests_geo_suite_LDADD = -L@top_builddir@/lib -larango -lboost_unit_test_framework
|
|
UnitTests_geo_suite_DEPENDENCIES = @top_builddir@/lib/libarango.a
|
|
|
|
UnitTests_geo_suite_SOURCES = \
|
|
UnitTests/Geo/Runner.cpp \
|
|
UnitTests/Geo/georeg.cpp \
|
|
arangod/GeoIndex/GeoIndex.c
|
|
|
|
else
|
|
|
|
unittests-boost:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< BOOST TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@echo "to enable boost unit-tests, install Boost test and configure with --enable-maintainer-mode"
|
|
|
|
@echo
|
|
endif
|
|
|
|
################################################################################
|
|
### @brief CONVENIENCE TARGET TO EXECUTE A SINGLE TEST ON SERVER AND CLIENT
|
|
################################################################################
|
|
|
|
.PHONY: unittests-single
|
|
|
|
unittests-single:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< SERVER TEST ($(TEST))"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
|
|
$(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --server.endpoint "tcp://$(VOCHOST):$(VOCPORT)" --javascript.unit-tests $(TEST) || test "x$(FORCE)" == "x1"
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint unix://$(VOCDIR)/arango.sock --server.disable-authentication true" PROTO=unix
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< SHELL CLIENT TEST ($(TEST))"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --javascript.unit-test $(TEST) || test "x$(FORCE)" == "x1"
|
|
sleep 2
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief SHELL TESTS COMMON (BASICS)
|
|
################################################################################
|
|
|
|
SHELL_COMMON = \
|
|
@top_srcdir@/js/common/tests/shell-require.js \
|
|
@top_srcdir@/js/common/tests/shell-aqlfunctions.js \
|
|
@top_srcdir@/js/common/tests/shell-attributes.js \
|
|
@top_srcdir@/js/common/tests/shell-base64.js \
|
|
@top_srcdir@/js/common/tests/shell-collection.js \
|
|
@top_srcdir@/js/common/tests/shell-collection-volatile.js \
|
|
@top_srcdir@/js/common/tests/shell-crypto.js \
|
|
@top_srcdir@/js/common/tests/shell-collection-noncluster.js \
|
|
@top_srcdir@/js/common/tests/shell-database.js \
|
|
@top_srcdir@/js/common/tests/shell-document.js \
|
|
@top_srcdir@/js/common/tests/shell-download.js \
|
|
@top_srcdir@/js/common/tests/shell-edge.js \
|
|
@top_srcdir@/js/common/tests/shell-fs.js \
|
|
@top_srcdir@/js/common/tests/shell-graph-traversal.js \
|
|
@top_srcdir@/js/common/tests/shell-graph-algorithms.js \
|
|
@top_srcdir@/js/common/tests/shell-graph-measurement.js \
|
|
@top_srcdir@/js/common/tests/shell-keygen.js \
|
|
@top_srcdir@/js/common/tests/shell-keygen-noncluster.js \
|
|
@top_srcdir@/js/common/tests/shell-index-ensure.js \
|
|
@top_srcdir@/js/common/tests/shell-simple-query.js \
|
|
@top_srcdir@/js/common/tests/shell-statement.js \
|
|
@top_srcdir@/js/common/tests/shell-transactions.js \
|
|
@top_srcdir@/js/common/tests/shell-unload.js \
|
|
@top_srcdir@/js/common/tests/shell-users.js \
|
|
@top_srcdir@/js/common/tests/shell-index.js \
|
|
@top_srcdir@/js/common/tests/shell-index-geo.js \
|
|
@top_srcdir@/js/common/tests/shell-cap-constraint.js \
|
|
@top_srcdir@/js/common/tests/shell-unique-constraint.js \
|
|
@top_srcdir@/js/common/tests/shell-hash-index.js \
|
|
@top_srcdir@/js/common/tests/shell-fulltext.js \
|
|
@top_srcdir@/js/common/tests/shell-graph.js
|
|
|
|
################################################################################
|
|
### @brief SHELL SERVER TESTS (BASICS)
|
|
################################################################################
|
|
|
|
SHELL_SERVER_ONLY = \
|
|
@top_srcdir@/js/server/tests/shell-sharding-helpers.js \
|
|
@top_srcdir@/js/server/tests/shell-compaction-noncluster.js \
|
|
@top_srcdir@/js/server/tests/shell-transactions-noncluster.js \
|
|
@top_srcdir@/js/server/tests/shell-routing.js \
|
|
@top_srcdir@/js/server/tests/shell-any-noncluster.js \
|
|
@top_srcdir@/js/server/tests/shell-bitarray-index.js \
|
|
@top_srcdir@/js/server/tests/shell-database-noncluster.js \
|
|
@top_srcdir@/js/server/tests/shell-foxx.js \
|
|
@top_srcdir@/js/server/tests/shell-foxx-repository.js \
|
|
@top_srcdir@/js/server/tests/shell-foxx-model.js \
|
|
@top_srcdir@/js/server/tests/shell-foxx-base-middleware.js \
|
|
@top_srcdir@/js/server/tests/shell-foxx-template-middleware.js \
|
|
@top_srcdir@/js/server/tests/shell-foxx-format-middleware.js \
|
|
@top_srcdir@/js/server/tests/shell-foxx-preprocessor.js \
|
|
@top_srcdir@/js/server/tests/shell-skiplist-index.js \
|
|
@top_srcdir@/js/server/tests/shell-skiplist-rm-performance.js \
|
|
@top_srcdir@/js/server/tests/shell-skiplist-correctness.js
|
|
|
|
SHELL_SERVER = $(SHELL_COMMON) $(SHELL_SERVER_ONLY)
|
|
|
|
.PHONY: unittests-shell-server
|
|
|
|
UNITTESTS_SERVER = $(addprefix --javascript.unit-tests ,$(SHELL_SERVER))
|
|
|
|
|
|
unittests-shell-server:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< SHELL SERVER TESTS (ALL) >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
|
|
$(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --server.endpoint tcp://$(VOCHOST):$(VOCPORT) $(UNITTESTS_SERVER) || test "x$(FORCE)" == "x1"
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
|
|
.PHONY: unittests-shell-server-only
|
|
|
|
UNITTESTS_SERVER_ONLY = $(addprefix --javascript.unit-tests ,$(SHELL_SERVER_ONLY))
|
|
|
|
|
|
unittests-shell-server-only:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< SHELL SERVER TESTS (SERVER-ONLY) >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
|
|
$(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --server.endpoint tcp://$(VOCHOST):$(VOCPORT) $(UNITTESTS_SERVER_ONLY) || test "x$(FORCE)" == "x1"
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
|
|
################################################################################
|
|
### @brief SHELL SERVER TESTS (AHUACATL)
|
|
################################################################################
|
|
|
|
SHELL_SERVER_AHUACATL = @top_srcdir@/js/server/tests/ahuacatl-ranges.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-optimiser.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-optimiser-in.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-optimiser-limit.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-optimiser-sort.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-optimiser-ref.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-escaping.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-functions.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-variables.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-bind.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-complex.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-logical.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-arithmetic.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-relational.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ternary.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-parse.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-hash.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-skiplist.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-cross.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-graph.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-edges.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-refaccess-variable.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-refaccess-attribute.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-simple.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-variables.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-geo.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-fulltext.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-collection.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-queries-noncollection.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-subquery.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-operators.js
|
|
|
|
SHELL_SERVER_AHUACATL_EXTENDED = \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-01.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-02.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-03.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-04.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-05.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-06.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-07.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-08.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-09.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-10.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-11.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-12.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-13.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-14.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-15.js \
|
|
@top_srcdir@/js/server/tests/ahuacatl-ranges-combined-16.js
|
|
|
|
.PHONY: unittests-shell-server-ahuacatl
|
|
|
|
UNITTESTS_SERVER_AHUACATL = $(addprefix --javascript.unit-tests ,$(SHELL_SERVER_AHUACATL))
|
|
UNITTESTS_SERVER_AHUACATL_EXTENDED = $(addprefix --javascript.unit-tests ,$(SHELL_SERVER_AHUACATL_EXTENDED))
|
|
|
|
unittests-shell-server-ahuacatl:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< SHELL SERVER TESTS (AHUACATL) >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
|
|
@test "x$(SKIP_AHUACATL)" == "x1" || $(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true $(UNITTESTS_SERVER_AHUACATL) || test "x$(FORCE)" == "x1"
|
|
@test "x$(SKIP_AHUACATL)" == "x1" || test "x$(SKIP_RANGES)" == "x1" || $(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true $(UNITTESTS_SERVER_AHUACATL_EXTENDED) || test "x$(FORCE)" == "x1"
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief SHELL CLIENT TESTS
|
|
################################################################################
|
|
|
|
SHELL_CLIENT_ONLY = \
|
|
@top_srcdir@/js/client/tests/shell-endpoints.js \
|
|
@top_srcdir@/js/client/tests/shell-fm.js \
|
|
@top_srcdir@/js/client/tests/shell-client.js
|
|
|
|
SHELL_CLIENT = $(SHELL_COMMON) $(SHELL_CLIENT_ONLY)
|
|
|
|
.PHONY: unittests-shell-client
|
|
|
|
UNITTESTS_CLIENT = $(addprefix --javascript.unit-tests ,$(SHELL_CLIENT))
|
|
|
|
unittests-shell-client:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint unix://$(VOCDIR)/arango.sock --server.disable-authentication true" PROTO=unix
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< SHELL CLIENT TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock $(UNITTESTS_CLIENT) || test "x$(FORCE)" == "x1"
|
|
sleep 2
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief HTTP SERVER TESTS
|
|
################################################################################
|
|
|
|
.PHONY: unittests-http-server
|
|
|
|
unittests-http-server:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< HTTP SERVER TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
cd @top_srcdir@/UnitTests/HttpInterface && ARANGO_SERVER="$(VOCHOST):$(VOCPORT)" ARANGO_SSL=0 ARANGO_USER="$(USERNAME)" ARANGO_PASSWORD="$(PASSWORD)" ./run-tests || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
|
|
################################################################################
|
|
### @brief SSL SERVER TESTS (same as HTTP SERVER TESTS but using SSL)
|
|
################################################################################
|
|
|
|
.PHONY: unittests-ssl-server
|
|
|
|
unittests-ssl-server:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint ssl://$(VOCHOST):$(VOCPORT) --server.keyfile $(CERT_FILE) --server.disable-authentication true" PROTO=https
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< SSL SERVER TESTS (same as HTTP SERVER TESTS but using SSL) >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
cd @top_srcdir@/UnitTests/HttpInterface && ARANGO_SERVER="$(VOCHOST):$(VOCPORT)" ARANGO_SSL=1 ARANGO_USER="$(USERNAME)" ARANGO_PASSWORD="$(PASSWORD)" ./run-tests || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief IMPORT TESTS
|
|
################################################################################
|
|
|
|
.PHONY: unittests-import
|
|
|
|
unittests-import:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint unix://$(VOCDIR)/arango.sock --server.disable-authentication true" PROTO=unix
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< IMPORT TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --javascript.unit-tests @top_srcdir@/js/server/tests/import-setup.js || test "x$(FORCE)" == "x1"
|
|
for i in 1 2 3 4; do $(VALGRIND) @builddir@/bin/arangoimp --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --file UnitTests/import-$$i.json --collection UnitTestsImportJson$$i --type json || test "x$(FORCE)" == "x1"; done
|
|
for i in 1 2; do $(VALGRIND) @builddir@/bin/arangoimp --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --file UnitTests/import-$$i.csv --collection UnitTestsImportCsv$$i --create-collection true --type csv || test "x$(FORCE)" == "x1"; done
|
|
for i in 1 2; do $(VALGRIND) @builddir@/bin/arangoimp --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --file UnitTests/import-$$i.tsv --collection UnitTestsImportTsv$$i --create-collection true --type tsv || test "x$(FORCE)" == "x1"; done
|
|
$(VALGRIND) @builddir@/bin/arangoimp --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --file UnitTests/import-edges.json --collection UnitTestsImportEdge --create-collection false --type json || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --javascript.unit-tests @top_srcdir@/js/server/tests/import.js || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --javascript.unit-tests @top_srcdir@/js/server/tests/import-teardown.js || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@sleep 5
|
|
@echo
|
|
|
|
|
|
################################################################################
|
|
### @brief REPLICATION TESTS
|
|
###
|
|
### starts two servers (master & slave) and checks for data drift
|
|
################################################################################
|
|
|
|
.PHONY: unittests-replication unittests-replication-server unittests-replication-client unittests-replication-http unittests-replication-data unittests-replication-logger
|
|
|
|
unittests-replication: unittests-replication-server unittests-replication-client unittests-replication-http unittests-replication-data unittests-replication-logger
|
|
|
|
unittests-replication-server:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< REPLICATION SERVER TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
|
|
$(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.unit-tests @top_srcdir@/js/common/tests/replication.js || test "x$(FORCE)" == "x1"
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
unittests-replication-client:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< REPLICATION CLIENT TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.unit-tests @top_srcdir@/js/common/tests/replication.js || test "x$(FORCE)" == "x1"
|
|
sleep 2
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
unittests-replication-http:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< REPLICATION HTTP TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
cd @top_srcdir@/UnitTests/HttpInterface && ARANGO_SERVER="$(VOCHOST):$(VOCPORT)" ARANGO_SSL=0 ARANGO_USER="$(USERNAME)" ARANGO_PASSWORD="$(PASSWORD)" ./run-tests-replication || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
unittests-replication-data:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication false" PROTO=http
|
|
$(MAKE) start-slave PID=$(PID) SERVER_START="--server.endpoint tcp://$(SLAVEHOST):$(SLAVEPORT) --server.disable-authentication true" PROTO=http
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< REPLICATION DATA TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.execute-string "require('org/arangodb/users').save('replicator-user', 'replicator-password', true); require('org/arangodb/users').reload();"
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.unit-tests @top_srcdir@/js/server/tests/replication-data.js || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
kill `cat $(SLAVEPIDFILE)`
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
while test -f $(SLAVEPIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
@rm -rf "$(VOCDIR)"
|
|
@rm -rf "$(SLAVEDIR)"
|
|
@echo
|
|
|
|
unittests-replication-logger:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< REPLICATION LOGGER TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
@echo "{\"autoStart\" : true }" > "$(VOCDIR)/REPLICATION-LOGGER-CONFIG"
|
|
$(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --server.endpoint tcp://$(VOCHOST):$(VOCPORT) $(UNITTESTS_SERVER) || test "x$(FORCE)" == "x1"
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief UPGRADE TESTS
|
|
###
|
|
### invokes the --upgrade option twice and checks for errors
|
|
################################################################################
|
|
|
|
.PHONY: unittests-upgrade
|
|
|
|
unittests-upgrade:
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< UPGRADE TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
@sleep 2
|
|
|
|
$(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --console --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --upgrade || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) --console --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --upgrade || test "x$(FORCE)" == "x1"
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief DATAFILE DEBUGGER TESTS
|
|
###
|
|
### this test just checks whether the dfdb starts.
|
|
### we will send an EOT signal to the dfdb process to stop it right away.
|
|
################################################################################
|
|
|
|
.PHONY: unittests-dfdb
|
|
|
|
unittests-dfdb:
|
|
@mkdir -p "$(VOCDIR)/databases"
|
|
@test -d "$(VOCDIR)"
|
|
|
|
echo -e "\x04" | ($(VALGRIND) @builddir@/bin/arangod -c etc/relative/arango-dfdb.conf --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --database.directory "$(VOCDIR)" || test "x$(FORCE)" == "x1")
|
|
|
|
################################################################################
|
|
### @brief FOXX MANAGER TESTS
|
|
###
|
|
### this test runs a few actions in the foxx manager binary
|
|
################################################################################
|
|
|
|
.PHONY: unittests-foxx-manager
|
|
|
|
unittests-foxx-manager:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication false" PROTO=http
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< FOXX MANAGER TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh -c etc/relative/foxx-manager.conf --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) update || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangosh -c etc/relative/foxx-manager.conf --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) search "itzpapalotl" || test "x$(FORCE)" == "x1"
|
|
sleep 2
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
|
|
################################################################################
|
|
### @brief ARANGODUMP TESTS
|
|
################################################################################
|
|
|
|
.PHONY: unittests-dump
|
|
|
|
unittests-dump:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true" PROTO=http
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< ARANGODUMP TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.unit-tests @top_srcdir@/js/server/tests/dump-setup.js || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangodump --configuration none --server.database "UnitTestsDumpSrc" --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --output-directory "$(VOCDIR)/dump" || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangorestore --configuration none --server.database "UnitTestsDumpDst" --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --input-directory "$(VOCDIR)/dump" || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.database "UnitTestsDumpDst" --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.unit-tests @top_srcdir@/js/server/tests/dump.js || test "x$(FORCE)" == "x1"
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.unit-tests @top_srcdir@/js/server/tests/dump-teardown.js || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
|
|
################################################################################
|
|
### @brief ARANGOB TESTS
|
|
################################################################################
|
|
|
|
.PHONY: unittests-arangob
|
|
|
|
unittests-arangob:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint unix://$(VOCDIR)/arango.sock --server.disable-authentication true" PROTO=unix
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< ARANGOB TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 10000 --concurrency 2 --test version --async true || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 20000 --concurrency 1 --test version --async true || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 100000 --concurrency 2 --test shapes --batch-size 16 --complexity 2 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 100000 --concurrency 2 --test shapes-append --batch-size 16 --complexity 4 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 100000 --concurrency 2 --test random-shapes --batch-size 16 --complexity 2 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 1000 --batch-size 16 --concurrency 2 --test version || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 100 --batch-size 0 --concurrency 1 --test version || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 100 --batch-size 10 --concurrency 2 --test document --complexity 1 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 2000 --concurrency 2 --test crud --complexity 1 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 4000 --concurrency 2 --test crud-append --complexity 4 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 4000 --concurrency 2 --test edge --complexity 4 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 5000 --concurrency 2 --test hash --complexity 1 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 5000 --concurrency 2 --test skiplist --complexity 1 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 500 --concurrency 3 --test aqltrx --complexity 1 || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 100 --concurrency 3 --test counttrx || test "x$(FORCE)" == "x1"
|
|
@builddir@/bin/arangob --configuration none --quiet --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint unix://$(VOCDIR)/arango.sock --requests 500 --concurrency 3 --test multitrx || test "x$(FORCE)" == "x1"
|
|
|
|
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief AUTHENTICATION
|
|
################################################################################
|
|
|
|
.PHONY: unittests-authentication
|
|
|
|
unittests-authentication:
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication false" PROTO=http
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< AUTHENTICATION TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
$(VALGRIND) @builddir@/bin/arangosh $(CLIENT_OPT) --server.username "$(USERNAME)" --server.password "$(PASSWORD)" --server.endpoint tcp://$(VOCHOST):$(VOCPORT) --javascript.unit-tests @top_srcdir@/js/client/tests/auth.js || test "x$(FORCE)" == "x1"
|
|
sleep 2
|
|
kill `cat $(PIDFILE)`
|
|
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
|
|
@rm -rf "$(VOCDIR)"
|
|
@echo
|
|
|
|
|
|
.PHONY: unittests-authentication-parameters
|
|
|
|
unittests-authentication-parameters:
|
|
|
|
@echo
|
|
@echo "================================================================================"
|
|
@echo "<< AUTHENTICATION PARAMETER TESTS >>"
|
|
@echo "================================================================================"
|
|
@echo
|
|
|
|
################################################################################
|
|
### @brief FULL AUTHENTICATION
|
|
################################################################################
|
|
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication false --server.authenticate-system-only false" PROTO=http
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api/" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api/version" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_admin/html" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_admin/html/" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/test" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/the-big-fat-fox" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
@rm -rf "$(VOCDIR)"
|
|
|
|
################################################################################
|
|
### @brief AUTHENTICATION FOR /_ ONLY
|
|
################################################################################
|
|
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication false --server.authenticate-system-only true" PROTO=http
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api/" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api/version" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_admin/html" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_admin/html/" EXPECTED="401" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/test" EXPECTED="404" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/the-big-fat-fox" EXPECTED="404" || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
@rm -rf "$(VOCDIR)"
|
|
|
|
################################################################################
|
|
### @brief NO AUTHENTICATION
|
|
################################################################################
|
|
|
|
$(MAKE) start-server PID=$(PID) SERVER_START="--server.endpoint tcp://$(VOCHOST):$(VOCPORT) --server.disable-authentication true --server.authenticate-system-only true" PROTO=http
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api/" EXPECTED="404" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api" EXPECTED="404" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_api/version" EXPECTED="200" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_admin/html" EXPECTED="301" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/_admin/html/" EXPECTED="301" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/test" EXPECTED="404" || test "x$(FORCE)" == "x1"
|
|
$(MAKE) curl-request-get CURL_PROTO="http" CURL_HOST="$(VOCHOST)" CURL_PORT="$(VOCPORT)" CURL_URL="/the-big-fat-fox" EXPECTED="404" || test "x$(FORCE)" == "x1"
|
|
|
|
kill `cat $(PIDFILE)`
|
|
while test -f $(PIDFILE); do sleep 1; done
|
|
@if [ "$(VALGRIND)" != "" ]; then sleep 60; fi
|
|
@rm -rf "$(VOCDIR)"
|
|
|
|
################################################################################
|
|
### @brief CPPCHECK
|
|
################################################################################
|
|
|
|
.PHONY: cppcheck
|
|
|
|
cppcheck:
|
|
@rm -f cppcheck.log cppcheck.log && echo -n "" > cppcheck.tmp
|
|
for platform in unix32 unix64; do cppcheck --enable=style --force --platform=$$platform --suppress="*:arangod/Ahuacatl/ahuacatl-tokens.c" --suppress="*:lib/JsonParser/json-parser.c" --suppress="*:lib/V8/v8-json.cpp" arangod/ lib/ 1> /dev/null 2>> cppcheck.tmp; done
|
|
@sort cppcheck.tmp | uniq > cppcheck.log
|
|
@rm cppcheck.tmp
|
|
@cat cppcheck.log
|
|
|
|
## -----------------------------------------------------------------------------
|
|
## --SECTION-- END-OF-FILE
|
|
## -----------------------------------------------------------------------------
|
|
|
|
## Local Variables:
|
|
## mode: outline-minor
|
|
## outline-regexp: "^\\(### @brief\\|## --SECTION--\\|# -\\*- \\)"
|
|
## End:
|