From fee01e2bb7624c305654c1a0d46ee6e88d36c5ad Mon Sep 17 00:00:00 2001 From: sersut Date: Wed, 9 Oct 2013 21:42:36 -0700 Subject: Add scripts that can run specs on jenkins. --- ci/jenkins_run_tests.bat | 9 +++++++++ ci/jenkins_run_tests.sh | 13 +++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 ci/jenkins_run_tests.bat create mode 100755 ci/jenkins_run_tests.sh diff --git a/ci/jenkins_run_tests.bat b/ci/jenkins_run_tests.bat new file mode 100644 index 00000000..4d1b1d14 --- /dev/null +++ b/ci/jenkins_run_tests.bat @@ -0,0 +1,9 @@ +set PATH=C:\Ruby192\bin;%PATH% + +ruby -v +call bundle install --binstubs --without docgen --path vendor/bundle || ( call rm Gemfile.lock && call bundle install --binstubs --path vendor/bundle ) +ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit spec/stress +set RSPEC_ERRORLVL=%ERRORLEVEL% + +REM Return the error level from rspec +exit /B %RSPEC_ERRORLVL% diff --git a/ci/jenkins_run_tests.sh b/ci/jenkins_run_tests.sh new file mode 100755 index 00000000..5bf7def0 --- /dev/null +++ b/ci/jenkins_run_tests.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +export PATH=$PATH:/usr/local/bin + +ruby -v; +# remove the Gemfile.lock and try again if bundler fails. +# This should take care of Gemfile changes that result in "bad" bundles without forcing us to rebundle every time +bundle install --without docgen --path vendor/bundle || ( rm Gemfile.lock && bundle install --path vendor/bundle ) +bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec; +RSPEC_RETURNCODE=$? + +# exit with the result of running rspec +exit $RSPEC_RETURNCODE -- cgit v1.2.1