Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # Exit on any error. |
| 4 | set -e |
| 5 | |
| 6 | test_version() { |
| 7 | version=$1 |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 8 | if [ "$version" == "jruby-1.7" ] ; then |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 9 | # No conformance tests yet -- JRuby is too broken to run them. |
| 10 | bash --login -c \ |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 11 | "rvm install $version && rvm use $version && rvm get head && \ |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 12 | which ruby && \ |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 13 | git clean -f && \ |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 14 | gem install bundler && bundle && \ |
| 15 | rake test" |
| 16 | else |
| 17 | bash --login -c \ |
| 18 | "rvm install $version && rvm use $version && \ |
| 19 | which ruby && \ |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 20 | git clean -f && \ |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 21 | gem install bundler && bundle && \ |
| 22 | rake test && |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame^] | 23 | rake gc_test && |
| 24 | cd ../conformance && make test_ruby && |
| 25 | cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh" |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 26 | fi |
| 27 | } |
| 28 | |
| 29 | test_version $1 |