diff --git a/UnitTests/Makefile.files b/UnitTests/Makefile.files index 33f3d27632..b754ddb23b 100755 --- a/UnitTests/Makefile.files +++ b/UnitTests/Makefile.files @@ -110,7 +110,7 @@ start-server: @test -d "$(VOCDIR)" - $(VALGRIND) @builddir@/bin/arango-upgrade --database.directory "$(VOCDIR)" + @builddir@/bin/arango-upgrade --relative --database.directory "$(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) @@ -231,7 +231,7 @@ unittests-shell-server: @rm -rf "$(VOCDIR)" @mkdir "$(VOCDIR)" - $(VALGRIND) @builddir@/bin/arango-upgrade --database.directory "$(VOCDIR)" + @builddir@/bin/arango-upgrade --relative --database.directory "$(VOCDIR)" $(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) $(UNITTESTS_SERVER) || test "x$(FORCE)" == "x1" @rm -rf "$(VOCDIR)" @@ -299,7 +299,7 @@ unittests-shell-server-ahuacatl: @rm -rf "$(VOCDIR)" @mkdir "$(VOCDIR)" - @test "x$(SKIP_AHUACATL)" == "x1" || $(VALGRIND) @builddir@/bin/arango-upgrade --database.directory "$(VOCDIR)" + @test "x$(SKIP_AHUACATL)" == "x1" || @builddir@/bin/arango-upgrade --relative --database.directory "$(VOCDIR)" @test "x$(SKIP_AHUACATL)" == "x1" || $(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) $(UNITTESTS_SERVER_AHUACATL) || test "x$(FORCE)" == "x1" @test "x$(SKIP_AHUACATL)" == "x1" || test "x$(SKIP_RANGES)" == "x1" || $(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) $(UNITTESTS_SERVER_AHUACATL_EXTENDED) || test "x$(FORCE)" == "x1" @@ -400,7 +400,7 @@ unittests-import: @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; 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 @@ -436,7 +436,7 @@ unittests-bitarray-index: @rm -rf "$(VOCDIR)" @mkdir "$(VOCDIR)" - $(VALGRIND) @builddir@/bin/arango-upgrade --database.directory "$(VOCDIR)" + @builddir@/bin/arango-upgrade --relative --database.directory "$(VOCDIR)" $(VALGRIND) @builddir@/bin/arangod "$(VOCDIR)" $(SERVER_OPT) $(UNITTESTS_SERVER_BITARRAY) || test "x$(FORCE)" == "x1" @ rm -rf "$(VOCDIR)" @@ -458,7 +458,7 @@ unittests-arangob: @echo "<< ARANGOB TESTS >>" @echo "================================================================================" @echo - + $(VALGRIND) @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" $(VALGRIND) @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" $(VALGRIND) @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" diff --git a/utils/Makefile.files b/utils/Makefile.files index 242993f27a..ec9572cca5 100644 --- a/utils/Makefile.files +++ b/utils/Makefile.files @@ -13,6 +13,8 @@ bin_SCRIPTS += \ bin/arango-dfdb \ bin/arango-upgrade +CLEANUP += $(bin_SCRIPTS) + ################################################################################ ### @brief arango password ################################################################################ diff --git a/utils/arango-upgrade.in b/utils/arango-upgrade.in index e59df63d22..83feb8b4bb 100755 --- a/utils/arango-upgrade.in +++ b/utils/arango-upgrade.in @@ -7,16 +7,22 @@ DATABASE="@DATABASEDIR@" MODULESPATH="@PKGDATADIR@/js/server/modules;@PKGDATADIR@/js/common/modules" SCRIPT="@PKGDATADIR@/js/server/arango-upgrade.js" -if [ "$#" -lt 1 ]; then - echo "usage: $0 [--database ]" - exit 1 -fi +while [ "$#" -gt 1 ]; do + case "$1" in + --database|--database.directory) + DATABASE="$2" + shift + ;; + + --relative) + ARANGOD="./bin/arangod" + MODULESPATH="./js/server/modules;./js/common/modules" + SCRIPT="./js/server/arango-upgrade.js" + ;; + esac -if [ "$1" == "--database" ] || [ "$1" == "--database.directory" ] ; then shift - DATABASE="$1" - shift -fi +done if test ! -d "$DATABASE"; then echo "$0: database directory '$DATABASE' does not exist"