forked from ConPaaS-team/conpaas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis.sh
executable file
·57 lines (39 loc) · 1.03 KB
/
travis.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
48
49
50
51
52
53
54
55
56
#!/bin/sh
set -e
COVERAGE="`which python-coverage || true`"
if [ -z "$COVERAGE" ]
then
COVERAGE="`which coverage`"
fi
cd $CI_HOME/conpaas-services/src
python setup.py install
cd $CI_HOME/conpaas-client
python setup.py install
cd $CI_HOME/conpaas-director
# Create fake files/directories not really needed for unit testing
touch ConPaaS.tar.gz
mkdir conpaas
cp -a ../conpaas-services/config conpaas
cp -a ../conpaas-services/scripts conpaas
mkdir -p cpsdirectorconf/certs
# We cannot use system-wide directories
sed -i s#/etc/cpsdirector#$PWD/cpsdirectorconf# director.cfg.example
mkdir -p $PWD/cpsdirectorconf/data
python setup.py install || true
export DIRECTOR_TESTING=true
# Create certificates
python cpsconf.py localhost
# Fake tarball
touch cpsdirectorconf/ConPaaS.tar.gz
$COVERAGE run --source=cpsdirector test.py
$COVERAGE report -m
cd ..
# end of conpaas director unit tests
# conpaas-services unit tests
cd conpaas-services/src/tests/
./unit-tests.sh
cd ../../..
# cps-tools unit tests
cd cps-tools
./unit-tests.sh
cd ..