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 # Install CLI gem's dependencies.
120 bundle install --deployment
122 # Install the Python SDK early. Various other test suites (like
123 # keepproxy) bring up run_test_server.py, which imports the arvados
124 # module. We can't actually *test* the Python SDK yet though, because
125 # its own test suite brings up some of those other programs (like
128 python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
129 pip install dist/arvados-python-client-0.1.*.tar.gz
131 checkexit "Python SDK install"
135 gotest services/keepstore
137 gotest services/keepproxy
139 # Python SDK (already installed, but we didn't run its tests yet)
141 title "Starting Python SDK tests"
147 checkexit "Python SDK tests"
156 checkexit "FUSE tests"
158 python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz
159 pip install dist/arvados_fuse-0.1.*.tar.gz
161 checkexit "FUSE install"
163 title "Python SDK tests complete"
167 for dir in sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer
173 title "Starting workbench tests"
176 bundle install --deployment
180 bundle exec rake test
182 checkexit "Workbench tests"
183 title "Workbench tests complete"
185 # Clean up temporary virtualenv and GOPATH
189 # The CLI SDK tests require a working API server, so let's skip those for now.
192 ########################################################################
195 title "Starting SDK CLI tests"
198 bundle install --deployment
200 # Set up Python SDK and dependencies
202 rm -rf $HOME/lib/python
203 mkdir $HOME/lib/python
204 PYTHONPATH="$HOME/lib/python" easy_install --install-dir=$HOME/lib/python --upgrade google-api-python-client
205 PYTHONPATH="$HOME/lib/python" python setup.py install --home=$HOME
209 export KEEP_LOCAL_STORE=/tmp/keep
210 PYTHONPATH="$HOME/lib/python" bundle exec rake test
212 checkexit "SDK CLI tests"
213 title "SDK CLI tests complete"