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="$HOME/gocode"
17 mkdir -p "$GOPATH/src/git.curoverse.com"
18 ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
21 title "Starting DOC build"
24 bundle install --deployment
26 # Make sure python-epydoc is installed or the next line won't do much good!
27 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
32 if [[ "$ECODE" != "0" ]]; then
33 title "!!!!!! $1 FAILED !!!!!!"
34 EXITCODE=$(($EXITCODE + $ECODE))
39 title "DOC build complete"
42 title "Starting DOC linkchecker"
45 bundle exec rake linkchecker baseurl=file://$WORKSPACE/doc/.site/
47 checkexit "Doc linkchecker"
48 title "DOC linkchecker complete"
51 title "Starting API server tests"
54 bundle install --deployment
56 rm -f config/database.yml
57 rm -f config/environments/test.rb
58 cp config/environments/test.rb.example config/environments/test.rb
60 # Get test database config
61 cp $HOME/arvados-api-server/database.yml config/
62 # Get test application.yml file
63 cp $HOME/arvados-api-server/application.yml config/
65 # Fill in a random secret_token and blob_signing_key for testing
66 SECRET_TOKEN=`echo 'puts rand(2**512).to_s(36)' |ruby`
67 BLOB_SIGNING_KEY=`echo 'puts rand(2**512).to_s(36)' |ruby`
69 sed -i'' -e "s:SECRET_TOKEN:$SECRET_TOKEN:" config/application.yml
70 sed -i'' -e "s:BLOB_SIGNING_KEY:$BLOB_SIGNING_KEY:" config/application.yml
74 # Set up empty git repo (for git tests)
75 GITDIR=$WORKSPACE/tmpgit
78 sed -i'' -e "s:/var/cache/git:$GITDIR:" config/application.default.yml
84 /usr/bin/git config user.email "jenkins@ci.curoverse.com"
85 /usr/bin/git config user.name "Jenkins, CI"
88 /usr/bin/git commit -m 'initial commit'
93 bundle exec rake db:drop
94 bundle exec rake db:create
95 bundle exec rake db:setup
98 checkexit "API server tests"
99 title "API server tests complete"
101 # Install and test Go bits. keepstore must come before keepproxy and keepclient.
102 for dir in services/keepstore services/keepproxy sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer
104 title "Starting $dir tests"
107 go get -t "git.curoverse.com/arvados.git/$dir" \
108 && go test "git.curoverse.com/arvados.git/$dir"
110 checkexit "$dir tests"
111 title "$dir tests complete"
116 title "Starting workbench tests"
119 bundle install --deployment
124 bundle exec rake test
126 checkexit "Workbench tests"
127 title "Workbench tests complete"
130 title "Starting Python SDK tests"
133 bundle install --deployment
135 # Set up Python SDK and dependencies
141 virtualenv --setuptools "$VENVDIR"
142 "$VENVDIR/bin/python" setup.py test
144 checkexit "Python SDK tests"
146 "$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
147 "$VENVDIR/bin/pip" install dist/arvados-python-client-0.1.*.tar.gz
149 checkexit "Python SDK install"
154 # We reuse $VENVDIR from the Python SDK tests above
155 "$VENVDIR/bin/python" setup.py test
157 checkexit "FUSE tests"
159 "$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
160 "$VENVDIR/bin/pip" install dist/arvados_fuse-0.1.*.tar.gz
162 checkexit "FUSE install"
164 title "Python SDK tests complete"
169 # The CLI SDK tests require a working API server, so let's skip those for now.
173 title "Starting SDK CLI tests"
176 bundle install --deployment
178 # Set up Python SDK and dependencies
180 rm -rf $HOME/lib/python
181 mkdir $HOME/lib/python
182 PYTHONPATH="$HOME/lib/python" easy_install --install-dir=$HOME/lib/python --upgrade google-api-python-client
183 PYTHONPATH="$HOME/lib/python" python setup.py install --home=$HOME
187 export KEEP_LOCAL_STORE=/tmp/keep
188 PYTHONPATH="$HOME/lib/python" bundle exec rake test
190 checkexit "SDK CLI tests"
191 title "SDK CLI tests complete"