aboutsummaryrefslogtreecommitdiffhomepage
path: root/ruby/travis-test.sh
blob: 930165e61bdfc73373e463cd578d5ca22358fab5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash

# Exit on any error.
set -e

test_version() {
  version=$1
  if [ "$version" == "jruby-1.7" ] ; then
    # No conformance tests yet -- JRuby is too broken to run them.
    bash --login -c \
      "rvm install $version && rvm use $version && rvm get head && \
       which ruby && \
       git clean -f && \
       gem install bundler && bundle && \
       rake test"
  else
    bash --login -c \
      "rvm install $version && rvm use $version && \
       which ruby && \
       git clean -f && \
       gem install bundler && bundle && \
       rake test &&
       cd ../conformance && make test_ruby"
  fi
}

test_version $1