forked from trobz/openerp-booking-chart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis_test.sh
executable file
·47 lines (30 loc) · 898 Bytes
/
.travis_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
38
39
40
41
42
43
44
45
46
47
#
# Test OpenERP web module with Travis and Github
#
# Parameters for web module tests
REPO_NAME="openerp-booking-chart"
MODULE_NAME="booking_chart"
# Script...
cd ..
DIR=$( cd "$( dirname "$0" )" && pwd )
COMMAND_REPO="$DIR/cmd"
SERVER_REPO="$DIR/openerp"
export PYTHONPATH=$SERVER_REPO:$COMMAND_REPO
export PATH=$SERVER_REPO:$COMMAND_REPO:$PATH
ADDONS="$DIR/openerp/openerp/addons,$DIR/addons,$DIR/$REPO_NAME"
echo "location: $DIR"
echo "PYTHONPATH: $PYTHONPATH"
echo "start openerp"
# launch openerp server
./openerp/openerp-server -d booking_chart_test -r openerp --addons $ADDONS > /dev/null &
server_pid=$!
echo "openerp server started"
# wait for server init
echo "sleep 5s"
sleep 5
echo "run web tests"
./cmd/oe run-tests -d ignored --addons $ADDONS -m $MODULE_NAME
exit_code=$?
echo "kill openerp server with pid ${server_pid}"
sudo kill -9 $server_pid
exit $exit_code