File: travis-test.sh

package info (click to toggle)
protobuf 3.12.4-1%2Bdeb11u1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 42,328 kB
  • sloc: cpp: 172,516; java: 93,320; objc: 60,903; ansic: 45,178; javascript: 29,813; cs: 24,146; python: 23,903; php: 11,352; ruby: 5,351; sh: 3,801; makefile: 3,419; xml: 2,532; pascal: 438; lisp: 92; awk: 17
file content (46 lines) | stat: -rwxr-xr-x 1,422 bytes parent folder | download | duplicates (4)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash

# Exit on any error.
set -e

test_version() {
  version=$1

  RUBY_CONFORMANCE=test_ruby

  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"
  elif [ "$version" == "ruby-2.6.0" -o "$version" == "ruby-2.7.0" ] ; then
    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 &&
       cd ../conformance && make ${RUBY_CONFORMANCE} &&
       cd ../ruby/compatibility_tests/v3.0.0 &&
       cp -R ../../lib lib && ./test.sh"
  else
    # Recent versions of OSX have deprecated OpenSSL, so we have to explicitly
    # provide a path to the OpenSSL directory installed via Homebrew.
    bash --login -c \
      "rvm install $version --with-openssl-dir=`brew --prefix openssl` && \
       rvm use $version && \
       which ruby && \
       git clean -f && \
       gem install bundler -v 1.17.3 && bundle && \
       rake test &&
       rake gc_test &&
       cd ../conformance && make ${RUBY_CONFORMANCE} &&
       cd ../ruby/compatibility_tests/v3.0.0 && ./test.sh"
  fi
}

test_version $1