forked from HazyResearch/deepdive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.sh
executable file
·37 lines (28 loc) · 883 Bytes
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /usr/bin/env bash
# Set username and password
export PGUSER=${PGUSER:-`whoami`}
export PGPASSWORD=${PGPASSWORD:-}
export PGPORT=${PGPORT:-5432}
export PGHOST=${PGHOST:-localhost}
export DBNAME=deepdive_test
export PGDATABASE=$DBNAME # for testing to work with null settings
export DEEPDIVE_HOME=`cd $(dirname $0); pwd`
cd $DEEPDIVE_HOME/lib
case $(uname) in
Darwin)
export LD_LIBRARY_PATH=$DEEPDIVE_HOME/lib/dw_mac/lib/protobuf/lib:$DEEPDIVE_HOME/lib/dw_mac/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=$DEEPDIVE_HOME/lib/dw_mac:$DYLD_LIBRARY_PATH
;;
Linux*)
export LD_LIBRARY_PATH=$DEEPDIVE_HOME/lib/dw_linux/lib:$DEEPDIVE_HOME/lib/dw_linux/lib64:$LD_LIBRARY_PATH
;;
*)
echo >&2 "$(uname): Unsupported OS"
false
esac
cd $DEEPDIVE_HOME
# Create test database
dropdb $DBNAME
createdb $DBNAME
# Run the test
SBT_OPTS="-Xmx2g" sbt "test"