mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
* Bazelfying conformance tests Adding infrastructure to "Bazelify" languages other than Java and C++ * Delete benchmarks for languages supported by other repositories * Bazelfying benchmark tests * Bazelfying python Use upb's system python rule instead of branching tensorflow * Bazelfying Ruby * Bazelfying C# * Bazelfying Objective-c * Bazelfying Kokoro mac builds * Bazelfying Kokoro linux builds * Deleting all deprecated files from autotools cleanup This boils down to Makefile.am and tests.sh and all of their remaining references * Cleanup after PR reorganizing - Enable 32 bit tests - Move conformance tests back - Use select statements to select alternate runtimes - Add internal prefixes to proto library macros * Updating READMEs to use bazel instead of autotools. * Bazelfying Kokoro release builds * First round of review fixes * Second round of review fixes * Third round of review fixes * Filtering out conformance tests from Bazel on Windows (b/241484899) * Add version metadata that was previously scraped from configure.ac * fixing typo from previous fix * Adding ruby version tests * Bumping pinned upb version, and adding tests to python CI
33 lines
902 B
Ruby
33 lines
902 B
Ruby
#!/usr/bin/ruby
|
|
|
|
# Test that Kokoro is using the expected version of ruby.
|
|
|
|
require 'test/unit'
|
|
|
|
class RubyVersionTest < Test::Unit::TestCase
|
|
|
|
def test_ruby_version
|
|
return if RUBY_PLATFORM == "java"
|
|
if not ENV["KOKORO_RUBY_VERSION"]
|
|
STDERR.puts("No kokoro ruby version found, skipping check")
|
|
return
|
|
end
|
|
|
|
actual = RUBY_VERSION
|
|
expected = ENV["KOKORO_RUBY_VERSION"].delete_prefix("ruby-")
|
|
assert actual.start_with?(expected), "Version #{actual} found, expecting #{expected}"
|
|
end
|
|
|
|
def test_jruby_version
|
|
return if RUBY_PLATFORM != "java"
|
|
if not ENV["KOKORO_RUBY_VERSION"]
|
|
STDERR.puts("No kokoro ruby version found, skipping check")
|
|
return
|
|
end
|
|
|
|
expected = ENV["KOKORO_RUBY_VERSION"].delete_prefix("jruby-")
|
|
actual = JRUBY_VERSION
|
|
assert actual.start_with?(expected), "Version #{actual} found, expecting #{expected}"
|
|
end
|
|
|
|
end
|