summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsersut <serdar@opscode.com>2013-10-09 21:42:36 -0700
committersersut <serdar@opscode.com>2013-10-09 21:42:36 -0700
commitfee01e2bb7624c305654c1a0d46ee6e88d36c5ad (patch)
tree1089ebcd8d67ab1b072893cff9aaff0876137006
parentce9a3a42b8f326445ae19134476428493b5711bc (diff)
downloadohai-enable-manhattan.tar.gz
Add scripts that can run specs on jenkins.enable-manhattan
-rw-r--r--ci/jenkins_run_tests.bat9
-rwxr-xr-xci/jenkins_run_tests.sh13
2 files changed, 22 insertions, 0 deletions
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