blob: cbe7cd983c1db36ed7ea091acf41dffb6c7a7ac1 [file] [log] [blame]
Brian Silverman9c614bc2016-02-15 20:20:02 -05001#!/usr/bin/env bash
2
3# Exit on any error.
4set -e
5
6test_version() {
7 version=$1
Austin Schuh40c16522018-10-28 20:27:54 -07008 if [ "$version" == "jruby-1.7" ] ; then
Brian Silverman9c614bc2016-02-15 20:20:02 -05009 # No conformance tests yet -- JRuby is too broken to run them.
10 bash --login -c \
Austin Schuh40c16522018-10-28 20:27:54 -070011 "rvm install $version && rvm use $version && rvm get head && \
Brian Silverman9c614bc2016-02-15 20:20:02 -050012 which ruby && \
Austin Schuh40c16522018-10-28 20:27:54 -070013 git clean -f && \
Brian Silverman9c614bc2016-02-15 20:20:02 -050014 gem install bundler && bundle && \
15 rake test"
16 else
17 bash --login -c \
18 "rvm install $version && rvm use $version && \
19 which ruby && \
Austin Schuh40c16522018-10-28 20:27:54 -070020 git clean -f && \
Brian Silverman9c614bc2016-02-15 20:20:02 -050021 gem install bundler && bundle && \
22 rake test &&
Austin Schuh40c16522018-10-28 20:27:54 -070023 rake gc_test &&
24 cd ../conformance && make test_ruby &&
25 cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
Brian Silverman9c614bc2016-02-15 20:20:02 -050026 fi
27}
28
29test_version $1