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