Skip to content

Commit

Permalink
Fix mac ruby tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mkruskal-google committed Dec 23, 2022
1 parent af19b32 commit 0ece600
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 42 deletions.
2 changes: 1 addition & 1 deletion kokoro/macos/ruby25/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Change to repo root
cd $(dirname $0)/../../..

./kokoro/macos/test_ruby.sh ruby-2.5.1
bash -l kokoro/macos/test_ruby.sh ruby-2.5.1
2 changes: 1 addition & 1 deletion kokoro/macos/ruby26/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Change to repo root
cd $(dirname $0)/../../..

./kokoro/macos/test_ruby.sh ruby-2.6.0
bash -l kokoro/macos/test_ruby.sh ruby-2.6.0
2 changes: 1 addition & 1 deletion kokoro/macos/ruby27/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Change to repo root
cd $(dirname $0)/../../..

./kokoro/macos/test_ruby.sh ruby-2.7.0
bash -l kokoro/macos/test_ruby.sh ruby-2.7.0
2 changes: 1 addition & 1 deletion kokoro/macos/ruby30/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Change to repo root
cd $(dirname $0)/../../..

./kokoro/macos/test_ruby.sh ruby-3.0.2
bash -l kokoro/macos/test_ruby.sh ruby-3.0.2
2 changes: 1 addition & 1 deletion kokoro/macos/ruby31/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ cd $(dirname $0)/../../..
# Fix locale issues in Monterey.
export LC_ALL=en_US.UTF-8

./kokoro/macos/test_ruby.sh ruby-3.1.0
bash -l kokoro/macos/test_ruby.sh ruby-3.1.0
15 changes: 11 additions & 4 deletions kokoro/macos/test_ruby.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
#!/bin/bash

set -ex
set -eux

VERSION=$1

# Prepare worker environment to run tests
KOKORO_INSTALL_RVM=yes
source kokoro/macos/prepare_build_macos_rc

# Setup ruby
# Install dependencies
brew install wget

# Setup ruby. Disable unbound variable errors, due to a known issue
# https://github.com/rvm/rvm/issues/4618.
set +u
rvm install $VERSION
rvm use $VERSION
rvm get head
which ruby
rvm current | grep -qe "${RUBY_VERSION}.*" || exit 1;
set -u

gem install --no-document bundler -v 1.17.3
bundle

# Run tests
bazel test //ruby/... --test_env=KOKORO_RUBY_VERSION=$VERSION
1 change: 0 additions & 1 deletion ruby/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ pkg_files(
"Gemfile",
"Rakefile",
"README.md",
"travis-test.sh",
],
strip_prefix = strip_prefix.from_root(""),
visibility = ["//pkg:__pkg__"],
Expand Down
32 changes: 0 additions & 32 deletions ruby/travis-test.sh

This file was deleted.

0 comments on commit 0ece600

Please sign in to comment.