aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/travis-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ruby/travis-test.sh')
-rwxr-xr-xruby/travis-test.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/ruby/travis-test.sh b/ruby/travis-test.sh
new file mode 100755
index 00000000..9ec7eb22
--- /dev/null
+++ b/ruby/travis-test.sh
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+
+# Exit on any error.
+set -e
+
+test_version() {
+ version=$1
+ if [ "$version" == "jruby" ] ; then
+ # No conformance tests yet -- JRuby is too broken to run them.
+ bash --login -c \
+ "rvm install $version && rvm use $version && \
+ which ruby && \
+ gem install bundler && bundle && \
+ rake test"
+ else
+ bash --login -c \
+ "rvm install $version && rvm use $version && \
+ which ruby && \
+ gem install bundler && bundle && \
+ rake test && \
+ cd ../conformance && \
+ make test_ruby"
+ fi
+}
+
+test_version $1