travis-test.sh 732 Bytes
Newer Older
Tamir Duberstein's avatar
Tamir Duberstein committed
1
#!/usr/bin/env bash
2 3 4 5 6 7

# Exit on any error.
set -e

test_version() {
  version=$1
Feng Xiao's avatar
Feng Xiao committed
8
  if [ "$version" == "jruby-1.7" ] ; then
9 10
    # No conformance tests yet -- JRuby is too broken to run them.
    bash --login -c \
11
      "rvm install $version && rvm use $version && rvm get head && \
12
       which ruby && \
13
       git clean -f && \
14 15 16 17 18 19
       gem install bundler && bundle && \
       rake test"
  else
    bash --login -c \
      "rvm install $version && rvm use $version && \
       which ruby && \
20
       git clean -f && \
21
       gem install bundler && bundle && \
22
       rake test &&
23
       rake gc_test &&
24 25
       cd ../conformance && make test_ruby &&
       cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
26
  fi
27 28
}

29
test_version $1