Skip to content

Commit b13c4e2

Browse files
Joohwan Ohjoowani
authored andcommitted
Fix broken Travis CI script
1 parent 921dc1b commit b13c4e2

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ language: python
22
python:
33
- "2.7"
44
before_install:
5-
- "sh setup_arangodb_2.4.sh"
5+
- "sh setup_arangodb_2.3.sh"
66
install:
77
- "pip install ."
88
script: nosetests

setup_arangodb_2.3.sh

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/bin/bash
2+
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
4+
cd $DIR
5+
6+
VERSION=2.3.4
7+
NAME=ArangoDB-$VERSION
8+
9+
if [ ! -d "$DIR/$NAME" ]; then
10+
# download ArangoDB
11+
echo "wget http://www.arangodb.org/repositories/travisCI/$NAME.tar.gz"
12+
wget http://www.arangodb.org/repositories/travisCI/$NAME.tar.gz
13+
echo "tar zxf $NAME.tar.gz"
14+
tar zvxf $NAME.tar.gz
15+
fi
16+
17+
ARCH=$(arch)
18+
PID=$(echo $PPID)
19+
TMP_DIR="/tmp/arangodb.$PID"
20+
PID_FILE="/tmp/arangodb.$PID.pid"
21+
ARANGODB_DIR="$DIR/$NAME"
22+
ARANGOD="${ARANGODB_DIR}/bin/arangod_x86_64"
23+
24+
# create database directory
25+
mkdir ${TMP_DIR}
26+
27+
echo "Starting ArangoDB '${ARANGOD}'"
28+
29+
${ARANGOD} \
30+
--database.directory ${TMP_DIR} \
31+
--configuration none \
32+
--server.endpoint tcp://127.0.0.1:8529 \
33+
--javascript.app-path ${ARANGODB_DIR}/js/apps \
34+
--javascript.startup-directory ${ARANGODB_DIR}/js \
35+
--database.maximal-journal-size 1048576 \
36+
--server.disable-authentication true &
37+
38+
sleep 2
39+
40+
echo "Check for arangod process"
41+
process=$(ps auxww | grep "bin/arangod" | grep -v grep)
42+
43+
if [ "x$process" == "x" ]; then
44+
echo "no 'arangod' process found"
45+
echo "ARCH = $ARCH"
46+
exit 1
47+
fi
48+
49+
echo "Waiting until ArangoDB is ready on port 8529"
50+
while [[ -z `curl -s 'http://127.0.0.1:8529/_api/version' ` ]] ; do
51+
echo -n "."
52+
sleep 2s
53+
done
54+
55+
echo "ArangoDB is up"

0 commit comments

Comments
 (0)