Index: third_party/protobuf/ruby/travis-test.sh |
diff --git a/third_party/protobuf/ruby/travis-test.sh b/third_party/protobuf/ruby/travis-test.sh |
new file mode 100755 |
index 0000000000000000000000000000000000000000..1b53dd789f2f0a143ef314a3f32194cc5338f129 |
--- /dev/null |
+++ b/third_party/protobuf/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" ] ; 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" |
+ # TODO(xiaofeng): Conformance tests are disabled because the ruby testee |
+ # program crashes on some inputs. |
+ # cd ../conformance && \ |
+ # make test_ruby |
+ fi |
+} |
+ |
+test_version $1 |