[ARVADOS-DEV] updated: abcdf588c84675cb4f5ce528ee30e4f40cac99b0

git at public.curoverse.com git at public.curoverse.com
Mon Feb 9 22:46:54 EST 2015


Summary of changes:
 jenkins/{run-diagnostics-suite.sh => run-performance-suite.sh} | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 copy jenkins/{run-diagnostics-suite.sh => run-performance-suite.sh} (87%)

       via  abcdf588c84675cb4f5ce528ee30e4f40cac99b0 (commit)
      from  f3e822f9fe498c6c9ef5fc0602b98695349e6e5e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit abcdf588c84675cb4f5ce528ee30e4f40cac99b0
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Feb 9 22:46:59 2015 -0500

    Add a script to run our performance tests.
    
    refs #4754

diff --git a/jenkins/run-performance-suite.sh b/jenkins/run-performance-suite.sh
new file mode 100755
index 0000000..6ffeff8
--- /dev/null
+++ b/jenkins/run-performance-suite.sh
@@ -0,0 +1,86 @@
+#!/bin/bash
+
+EXITCODE=0
+
+INSTANCE=$1
+REVISION=$2
+
+if [[ "$INSTANCE" == '' ]]; then
+  echo "Syntax: $0 <instance> [revision]"
+  exit 1
+fi
+
+if [[ "$REVISION" == '' ]]; then
+  # See if there's a configuration file with the revision?
+  CONFIG_PATH=/home/jenkins/configuration/$INSTANCE.arvadosapi.com-versions.conf
+  if [[ -f $CONFIG_PATH ]]; then
+    echo "Loading git revision from $CONFIG_PATH"
+    . $CONFIG_PATH
+    REVISION=$ARVADOS_GIT_REVISION
+  fi
+fi
+
+if [[ "$REVISION" != '' ]]; then
+  echo "Git revision is $REVISION"
+else
+  echo "No valid git revision found, proceeding with what is in place."
+fi
+
+# Sanity check
+if ! [[ -n "$WORKSPACE" ]]; then
+  echo "WORKSPACE environment variable not set"
+  exit 1
+fi
+
+title () {
+    txt="********** $1 **********"
+    printf "\n%*s%s\n\n" $((($COLUMNS-${#txt})/2)) "" "$txt"
+}
+
+timer_reset() {
+    t0=$SECONDS
+}
+
+timer() {
+    echo -n "$(($SECONDS - $t0))s"
+}
+
+source /etc/profile.d/rvm.sh
+echo $WORKSPACE
+
+title "Starting performance test"
+timer_reset
+
+cd $WORKSPACE
+
+if [[ "$REVISION" != '' ]]; then
+  git checkout $REVISION
+fi
+
+cp -f /home/jenkins/diagnostics/arvados-workbench/$INSTANCE-application.yml $WORKSPACE/apps/workbench/config/application.yml
+
+cd $WORKSPACE/apps/workbench
+
+HOME="$GEMHOME" bundle install --no-deployment
+
+if [[ ! -d tmp ]]; then
+  mkdir tmp
+fi
+
+RAILS_ENV=performance bundle exec rake TEST=test/performance/browsing_test.rb
+
+ECODE=$?
+
+if [[ "$REVISION" != '' ]]; then
+  git checkout master
+fi
+
+if [[ "$ECODE" != "0" ]]; then
+  title "!!!!!! PERFORMANCE TESTS FAILED (`timer`) !!!!!!"
+  EXITCODE=$(($EXITCODE + $ECODE))
+  exit $EXITCODE
+fi
+
+title "Performance tests complete (`timer`)"
+
+exit $EXITCODE

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list