7 ARVADOS_API_HOST=qr1hi.arvadosapi.com
10 printf "\n%*s\n\n" $(((${#title}+$COLUMNS)/2)) "********** $1 **********"
13 source /etc/profile.d/rvm.sh
16 export GOPATH=$(mktemp -d)
17 mkdir -p "$GOPATH/src/git.curoverse.com"
18 ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
21 virtualenv --setuptools "$VENVDIR"
22 PATH="$VENVDIR/bin:$PATH"
25 title "Starting DOC build"
28 bundle install --deployment
30 # Make sure python-epydoc is installed or the next line won't do much good!
31 PYTHONPATH=$WORKSPACE/sdk/python/ bundle exec rake generate baseurl=file://$WORKSPACE/doc/.site/ arvados_workbench_host=workbench.$ARVADOS_API_HOST arvados_api_host=$ARVADOS_API_HOST
36 if [[ "$ECODE" != "0" ]]; then
37 title "!!!!!! $1 FAILED !!!!!!"
38 EXITCODE=$(($EXITCODE + $ECODE))
43 title "Starting $1 tests"
46 go get -t "git.curoverse.com/arvados.git/$1" \
47 && go test "git.curoverse.com/arvados.git/$1"
50 title "$1 tests complete"
54 title "DOC build complete"
57 title "Starting DOC linkchecker"
60 bundle exec rake linkchecker baseurl=file://$WORKSPACE/doc/.site/
62 checkexit "Doc linkchecker"
63 title "DOC linkchecker complete"
66 title "Starting API server tests"
69 bundle install --deployment
71 rm -f config/database.yml
72 rm -f config/environments/test.rb
73 cp config/environments/test.rb.example config/environments/test.rb
75 # Get test database config
76 cp $HOME/arvados-api-server/database.yml config/
77 # Get test application.yml file
78 cp $HOME/arvados-api-server/application.yml config/
80 # Fill in a random secret_token and blob_signing_key for testing
81 SECRET_TOKEN=`echo 'puts rand(2**512).to_s(36)' |ruby`
82 BLOB_SIGNING_KEY=`echo 'puts rand(2**512).to_s(36)' |ruby`
84 sed -i'' -e "s:SECRET_TOKEN:$SECRET_TOKEN:" config/application.yml
85 sed -i'' -e "s:BLOB_SIGNING_KEY:$BLOB_SIGNING_KEY:" config/application.yml
89 # Set up empty git repo (for git tests)
90 GITDIR=$WORKSPACE/tmpgit
93 sed -i'' -e "s:/var/cache/git:$GITDIR:" config/application.default.yml
99 /usr/bin/git config user.email "jenkins@ci.curoverse.com"
100 /usr/bin/git config user.name "Jenkins, CI"
103 /usr/bin/git commit -m 'initial commit'
108 bundle exec rake db:drop
109 bundle exec rake db:create
110 bundle exec rake db:setup
111 bundle exec rake test
113 checkexit "API server tests"
114 title "API server tests complete"
116 # Keepstore. The keepstore binary is used by many other test suites,
117 # so we test and install it early.
119 gotest services/keepstore
125 bundle install --deployment
127 # Set up Python SDK and dependencies
129 title "Starting Python SDK tests"
135 checkexit "Python SDK tests"
137 python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
138 pip install dist/arvados-python-client-0.1.*.tar.gz
140 checkexit "Python SDK install"
145 # We reuse $VENVDIR from the Python SDK tests above
148 checkexit "FUSE tests"
150 python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
151 pip install dist/arvados_fuse-0.1.*.tar.gz
153 checkexit "FUSE install"
155 title "Python SDK tests complete"
157 for dir in services/keepproxy sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer
163 title "Starting workbench tests"
166 bundle install --deployment
170 bundle exec rake test
172 checkexit "Workbench tests"
173 title "Workbench tests complete"
175 # Clean up temporary virtualenv and GOPATH
179 # The CLI SDK tests require a working API server, so let's skip those for now.
183 title "Starting SDK CLI tests"
186 bundle install --deployment
188 # Set up Python SDK and dependencies
190 rm -rf $HOME/lib/python
191 mkdir $HOME/lib/python
192 PYTHONPATH="$HOME/lib/python" easy_install --install-dir=$HOME/lib/python --upgrade google-api-python-client
193 PYTHONPATH="$HOME/lib/python" python setup.py install --home=$HOME
197 export KEEP_LOCAL_STORE=/tmp/keep
198 PYTHONPATH="$HOME/lib/python" bundle exec rake test
200 checkexit "SDK CLI tests"
201 title "SDK CLI tests complete"