mirror of https://gitee.com/bigwinds/arangodb
43 lines
852 B
Bash
Executable File
43 lines
852 B
Bash
Executable File
#!/bin/bash
|
|
export PID=$$
|
|
export GLIBCXX_FORCE_NEW=1
|
|
|
|
if test -n "$ORIGINAL_PATH"; then
|
|
# running in cygwin...
|
|
PS='\'
|
|
export EXT=".exe"
|
|
else
|
|
export EXT=""
|
|
PS='/'
|
|
fi;
|
|
|
|
export PORT=`expr 1024 + $RANDOM`
|
|
|
|
NUMA=""
|
|
|
|
if `which numactl > /dev/null`; then
|
|
NUMA="numactl --interleave=all"
|
|
fi
|
|
|
|
if [ -z "${ARANGOSH}" ]; then
|
|
if [ -x build/bin/arangosh ]; then
|
|
ARANGOSH=build/bin/arangosh
|
|
elif [ -x bin/arangosh ]; then
|
|
ARANGOSH=bin/arangosh
|
|
elif [ -x usr/bin/arangosh ]; then
|
|
ARANGOSH=usr/bin/arangosh
|
|
else
|
|
echo "$0: cannot locate arangosh"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
#
|
|
exec $NUMA $ARANGOSH \
|
|
-c etc${PS}relative${PS}arangosh.conf \
|
|
--log.level warning \
|
|
--server.endpoint tcp://127.0.0.1:${PORT} \
|
|
--javascript.execute UnitTests${PS}unittest.js \
|
|
-- \
|
|
"$@"
|