3 # Copyright (C) The Arvados Authors. All rights reserved.
5 # SPDX-License-Identifier: AGPL-3.0
12 if [[ "$INSTANCE" == '' ]]; then
13 echo "Syntax: $0 <instance> [revision]"
17 if [[ "$REVISION" == '' ]]; then
18 # See if there's a configuration file with the revision?
19 CONFIG_PATH=/home/jenkins/configuration/$INSTANCE.arvadosapi.com-versions.conf
20 if [[ -f $CONFIG_PATH ]]; then
21 echo "Loading git revision from $CONFIG_PATH"
23 REVISION=$ARVADOS_GIT_REVISION
27 if [[ "$REVISION" != '' ]]; then
28 echo "Git revision is $REVISION"
30 echo "No valid git revision found, proceeding with what is in place."
34 if ! [[ -n "$WORKSPACE" ]]; then
35 echo "WORKSPACE environment variable not set"
40 txt="********** $1 **********"
41 printf "\n%*s%s\n\n" $((($COLUMNS-${#txt})/2)) "" "$txt"
49 echo -n "$(($SECONDS - $t0))s"
52 source /etc/profile.d/rvm.sh
55 title "Starting performance test"
60 if [[ "$REVISION" != '' ]]; then
61 git checkout $REVISION
66 if [[ "$ECODE" != "0" ]]; then
67 title "!!!!!! PERFORMANCE TESTS FAILED (`timer`) !!!!!!"
68 EXITCODE=$(($EXITCODE + $ECODE))
72 cp -f /home/jenkins/diagnostics/arvados-workbench/$INSTANCE-application.yml $WORKSPACE/apps/workbench/config/application.yml
74 cd $WORKSPACE/apps/workbench
76 HOME="$GEMHOME" bundle install --no-deployment
78 if [[ ! -d tmp ]]; then
84 RAILS_ENV=performance bundle exec rake test:benchmark
88 if [[ "$REVISION" != '' ]]; then
92 if [[ "$ECODE" != "0" ]]; then
93 title "!!!!!! PERFORMANCE TESTS FAILED (`timer`) !!!!!!"
94 EXITCODE=$(($EXITCODE + $ECODE))
98 title "Performance tests complete (`timer`)"