Allow specification of revision to test with diagnostics suite.
authorWard Vandewege <ward@curoverse.com>
Wed, 8 Oct 2014 03:04:52 +0000 (23:04 -0400)
committerWard Vandewege <ward@curoverse.com>
Wed, 8 Oct 2014 03:04:52 +0000 (23:04 -0400)
No issue #

jenkins/run-diagnostics-suite.sh

index dfd03a8d930dcd7d49b38ea08fa69b8d0313c10b..e1229ff2aada1ddcd77fe571a19d090bb8323c2f 100755 (executable)
@@ -3,9 +3,10 @@
 EXITCODE=0
 
 INSTANCE=$1
+REVISION=$2
 
 if [[ "$INSTANCE" == '' ]]; then
-  echo "Syntax: $0 <instance>"
+  echo "Syntax: $0 <instance> [revision]"
   exit 1
 fi
 
@@ -36,6 +37,10 @@ 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
@@ -50,6 +55,10 @@ RAILS_ENV=diagnostics bundle exec rake TEST=test/diagnostics/pipeline_test.rb
 
 ECODE=$?
 
+if [[ "$REVISION" != '' ]]; then
+  git checkout master
+fi
+
 if [[ "$ECODE" != "0" ]]; then
   title "!!!!!! DIAGNOSTICS FAILED (`timer`) !!!!!!"
   EXITCODE=$(($EXITCODE + $ECODE))