2015-05-07 00:24:58 +00:00
|
|
|
#!/usr/bin/env bash
|
2015-05-13 21:58:48 +00:00
|
|
|
|
|
|
|
# Exit on any error.
|
|
|
|
set -e
|
|
|
|
|
|
|
|
test_version() {
|
|
|
|
version=$1
|
2019-01-08 18:53:34 +00:00
|
|
|
|
2019-08-22 23:17:37 +00:00
|
|
|
RUBY_CONFORMANCE=test_ruby
|
2019-01-08 18:53:34 +00:00
|
|
|
|
2016-07-22 01:04:56 +00:00
|
|
|
if [ "$version" == "jruby-1.7" ] ; then
|
2015-07-17 23:20:01 +00:00
|
|
|
# No conformance tests yet -- JRuby is too broken to run them.
|
|
|
|
bash --login -c \
|
2016-09-21 17:56:53 +00:00
|
|
|
"rvm install $version && rvm use $version && rvm get head && \
|
2015-07-17 23:20:01 +00:00
|
|
|
which ruby && \
|
2016-10-14 05:01:08 +00:00
|
|
|
git clean -f && \
|
2015-07-17 23:20:01 +00:00
|
|
|
gem install bundler && bundle && \
|
|
|
|
rake test"
|
2020-04-24 16:50:27 +00:00
|
|
|
elif [ "$version" == "ruby-2.6.0" -o "$version" == "ruby-2.7.0" ] ; then
|
2019-01-03 22:25:50 +00:00
|
|
|
bash --login -c \
|
|
|
|
"rvm install $version && rvm use $version && \
|
|
|
|
which ruby && \
|
|
|
|
git clean -f && \
|
|
|
|
gem install bundler -v 1.17.3 && bundle && \
|
|
|
|
rake test &&
|
|
|
|
rake gc_test &&
|
2019-01-08 18:53:34 +00:00
|
|
|
cd ../conformance && make ${RUBY_CONFORMANCE} &&
|
2019-01-03 22:25:50 +00:00
|
|
|
cd ../ruby/compatibility_tests/v3.0.0 &&
|
|
|
|
cp -R ../../lib lib && ./test.sh"
|
2015-07-17 23:20:01 +00:00
|
|
|
else
|
2019-03-26 00:19:48 +00:00
|
|
|
# Recent versions of OSX have deprecated OpenSSL, so we have to explicitly
|
|
|
|
# provide a path to the OpenSSL directory installed via Homebrew.
|
2015-07-17 23:20:01 +00:00
|
|
|
bash --login -c \
|
2019-03-26 00:19:48 +00:00
|
|
|
"rvm install $version --with-openssl-dir=`brew --prefix openssl` && \
|
|
|
|
rvm use $version && \
|
2015-07-17 23:20:01 +00:00
|
|
|
which ruby && \
|
2016-10-14 05:01:08 +00:00
|
|
|
git clean -f && \
|
2019-01-03 22:25:50 +00:00
|
|
|
gem install bundler -v 1.17.3 && bundle && \
|
2016-01-12 05:10:46 +00:00
|
|
|
rake test &&
|
2017-10-04 00:28:49 +00:00
|
|
|
rake gc_test &&
|
2019-01-08 18:53:34 +00:00
|
|
|
cd ../conformance && make ${RUBY_CONFORMANCE} &&
|
2017-02-24 01:53:06 +00:00
|
|
|
cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
|
2015-07-17 23:20:01 +00:00
|
|
|
fi
|
2015-05-13 21:58:48 +00:00
|
|
|
}
|
|
|
|
|
2015-05-13 23:43:48 +00:00
|
|
|
test_version $1
|