summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan McLellan <btm@opscode.com>2012-11-13 09:33:47 -0800
committerBryan McLellan <btm@opscode.com>2012-11-13 09:38:31 -0800
commit439cbdafe569cd7dddc881ef559ecc45e77bd87e (patch)
treef24ffb6846cf286c937cb749fa5aff4fc13e38af
parent6d2922b29e19f4af323f662bccb17ef87291761c (diff)
downloadchef-439cbdafe569cd7dddc881ef559ecc45e77bd87e.tar.gz
Place script in repo for running CI tests
Chef 10 and 11 differ in directory structure so lets add a script to ease that This also exposes our testing a bit so other people know what we are doing interally.
-rw-r--r--ci/jenkins_run_tests.bat8
-rwxr-xr-xci/jenkins_run_tests.sh12
2 files changed, 20 insertions, 0 deletions
diff --git a/ci/jenkins_run_tests.bat b/ci/jenkins_run_tests.bat
new file mode 100644
index 0000000000..445798090c
--- /dev/null
+++ b/ci/jenkins_run_tests.bat
@@ -0,0 +1,8 @@
+set PATH=C:\Ruby192\bin;%PATH%
+
+REM Chef 10 contains the client in the chef/ sub-directory
+cd chef
+
+ruby -v
+call bundle install --binstubs --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/unit spec/functional
diff --git a/ci/jenkins_run_tests.sh b/ci/jenkins_run_tests.sh
new file mode 100755
index 0000000000..5e5078042d
--- /dev/null
+++ b/ci/jenkins_run_tests.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+export PATH=/usr/local/bin:$PATH
+
+# Chef 10 contains the client in the chef/ sub-directory
+cd chef
+
+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 --binstubs --path vendor/bundle || ( rm Gemfile.lock && bundle install --binstubs --path vendor/bundle )
+bin/rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec;