File tree 11 files changed +2009
-1
lines changed
compatibility_tests/v3.0.0
11 files changed +2009
-1
lines changed Original file line number Diff line number Diff line change @@ -775,6 +775,15 @@ ruby_EXTRA_DIST= \
775
775
ruby/.gitignore \
776
776
ruby/README.md \
777
777
ruby/Rakefile \
778
+ ruby/compatibility_tests/v3.0.0/tests/test_import.proto \
779
+ ruby/compatibility_tests/v3.0.0/tests/stress.rb \
780
+ ruby/compatibility_tests/v3.0.0/tests/repeated_field_test.rb \
781
+ ruby/compatibility_tests/v3.0.0/tests/generated_code_test.rb \
782
+ ruby/compatibility_tests/v3.0.0/tests/generated_code.proto \
783
+ ruby/compatibility_tests/v3.0.0/tests/basic.rb \
784
+ ruby/compatibility_tests/v3.0.0/test.sh \
785
+ ruby/compatibility_tests/v3.0.0/Rakefile \
786
+ ruby/compatibility_tests/v3.0.0/README.md \
778
787
ruby/ext/google/protobuf_c/defs.c \
779
788
ruby/ext/google/protobuf_c/encode_decode.c \
780
789
ruby/ext/google/protobuf_c/extconf.rb \
Original file line number Diff line number Diff line change
1
+ # Protobuf Ruby Compatibility Tests
2
+
3
+ This drectory contains a snapshot of protobuf ruby 3.0.0 unittest code and
4
+ test scripts used to verifies whether the latest version of protobuf is
5
+ still compatible with 3.0.0 generated code.
Original file line number Diff line number Diff line change
1
+ require "rake/testtask"
2
+
3
+ # Proto for tests.
4
+ genproto_output = [ ]
5
+ genproto_output << "tests/generated_code.rb"
6
+ genproto_output << "tests/test_import.rb"
7
+ file "tests/generated_code.rb" => "tests/generated_code.proto" do |file_task |
8
+ sh "./protoc --ruby_out=. tests/generated_code.proto"
9
+ end
10
+
11
+ file "tests/test_import.rb" => "tests/test_import.proto" do |file_task |
12
+ sh "./protoc --ruby_out=. tests/test_import.proto"
13
+ end
14
+
15
+ task :genproto => genproto_output
16
+
17
+ task :clean do
18
+ sh "rm -f #{ genproto_output . join ( ' ' ) } "
19
+ end
20
+
21
+ Rake ::TestTask . new ( :test => :genproto ) do |t |
22
+ t . test_files = FileList [ "tests/*.rb" ]
23
+ end
24
+
25
+ task :default => [ :test ]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -ex
4
+
5
+ # Change to the script's directory
6
+ cd $( dirname $0 )
7
+
8
+ # Download 3.0.0 version of protoc
9
+ PROTOC_BINARY_NAME=" protoc-3.0.0-linux-x86_64.exe"
10
+ if [ ` uname` = " Darwin" ]; then
11
+ PROTOC_BINARY_NAME=" protoc-3.0.0-osx-x86_64.exe"
12
+ fi
13
+ wget http://repo1.maven.org/maven2/com/google/protobuf/protoc/3.0.0/${PROTOC_BINARY_NAME} -O protoc
14
+ chmod +x protoc
15
+
16
+ # Run tests
17
+ rake test
You can’t perform that action at this time.
0 commit comments