7 ARVADOS_API_HOST=qr1hi.arvadosapi.com
10 printf "\n%*s\n\n" $(((${#title}+$COLUMNS)/2)) "********** $1 **********"
13 source /etc/profile.d/rvm.sh
17 title "Starting DOC build"
20 bundle install --deployment
22 # Make sure python-epydoc is installed or the next line won't do much good!
23 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
27 if [[ "$ECODE" != "0" ]]; then
28 title "!!!!!! DOC BUILD FAILED !!!!!!"
29 EXITCODE=$(($EXITCODE + $ECODE))
32 title "DOC build complete"
35 title "Starting DOC linkchecker"
38 bundle exec rake linkchecker baseurl=file://$WORKSPACE/doc/.site/
42 if [[ "$ECODE" != "0" ]]; then
43 title "!!!!!! DOC LINKCHECKER FAILED !!!!!!"
44 EXITCODE=$(($EXITCODE + $ECODE))
47 title "DOC linkchecker complete"
50 title "Starting API server tests"
53 bundle install --deployment
55 rm -f config/database.yml
56 rm -f config/environments/test.rb
57 cp config/environments/test.rb.example config/environments/test.rb
59 # Get test database config
60 cp $HOME/arvados-api-server/database.yml config/
61 # Get test application.yml file
62 cp $HOME/arvados-api-server/application.yml config/
64 # Fill in a random secret_token and blob_signing_key for testing
65 SECRET_TOKEN=`echo 'puts rand(2**512).to_s(36)' |ruby`
66 BLOB_SIGNING_KEY=`echo 'puts rand(2**512).to_s(36)' |ruby`
68 sed -i'' -e "s:SECRET_TOKEN:$SECRET_TOKEN:" config/application.yml
69 sed -i'' -e "s:BLOB_SIGNING_KEY:$BLOB_SIGNING_KEY:" config/application.yml
73 # Set up empty git repo (for git tests)
74 GITDIR=$WORKSPACE/tmpgit
77 sed -i'' -e "s:/var/cache/git:$GITDIR:" config/application.default.yml
83 /usr/bin/git config user.email "jenkins@ci.curoverse.com"
84 /usr/bin/git config user.name "Jenkins, CI"
87 /usr/bin/git commit -m 'initial commit'
92 bundle exec rake db:drop
93 bundle exec rake db:create
94 bundle exec rake db:setup
99 if [[ "$ECODE" != "0" ]]; then
100 title "!!!!!! API SERVER TESTS FAILED !!!!!!"
101 EXITCODE=$(($EXITCODE + $ECODE))
104 title "API server tests complete"
107 title "Starting Keep tests"
109 cd services/keep/src/keep
110 GOPATH=$HOME/gocode go test
114 if [[ "$ECODE" != "0" ]]; then
115 title "!!!!!! Keep TESTS FAILED !!!!!!"
116 EXITCODE=$(($EXITCODE + $ECODE))
119 title "Keep tests complete"
122 title "Starting workbench tests"
125 bundle install --deployment
130 bundle exec rake test
134 if [[ "$ECODE" != "0" ]]; then
135 title "!!!!!! WORKBENCH TESTS FAILED !!!!!!"
136 EXITCODE=$(($EXITCODE + $ECODE))
139 title "Workbench tests complete"
142 title "Starting Python SDK tests"
145 bundle install --deployment
147 # Set up Python SDK and dependencies
153 virtualenv --setuptools --system-site-packages "$VENVDIR"
154 "$VENVDIR/bin/pip" install -e .
155 GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
159 if [[ "$ECODE" != "0" ]]; then
160 title "!!!!!! Python SDK TESTS FAILED !!!!!!"
161 EXITCODE=$(($EXITCODE + $ECODE))
164 "$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
165 "$VENVDIR/bin/pip" install dist/arvados-python-client-0.1.*.tar.gz
169 if [[ "$ECODE" != "0" ]]; then
170 title "!!!!!! Python SDK install FAILED !!!!!!"
171 EXITCODE=$(($EXITCODE + $ECODE))
177 # We reuse $VENVDIR from the Python SDK tests above
178 "$VENVDIR/bin/pip" install -e .
179 GOPATH="$HOME/gocode" "$VENVDIR/bin/python" -m unittest discover tests
183 if [[ "$ECODE" != "0" ]]; then
184 title "!!!!!! Fuse TESTS FAILED !!!!!!"
185 EXITCODE=$(($EXITCODE + $ECODE))
188 "$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1
189 "$VENVDIR/bin/pip" install dist/arvados_fuse-0.1.*.tar.gz
193 if [[ "$ECODE" != "0" ]]; then
194 title "!!!!!! Fuse install FAILED !!!!!!"
195 EXITCODE=$(($EXITCODE + $ECODE))
198 title "Python SDK tests complete"
203 # The CLI SDK tests require a working API server, so let's skip those for now.
207 title "Starting SDK CLI tests"
210 bundle install --deployment
212 # Set up Python SDK and dependencies
214 rm -rf $HOME/lib/python
215 mkdir $HOME/lib/python
216 PYTHONPATH="$HOME/lib/python" easy_install --install-dir=$HOME/lib/python --upgrade google-api-python-client
217 PYTHONPATH="$HOME/lib/python" python setup.py install --home=$HOME
221 export KEEP_LOCAL_STORE=/tmp/keep
222 PYTHONPATH="$HOME/lib/python" bundle exec rake test
226 if [[ "$ECODE" != "0" ]]; then
227 title "!!!!!! SDK CLI TESTS FAILED !!!!!!"
228 EXITCODE=$(($EXITCODE + $ECODE))
231 title "SDK CLI tests complete"