Squashed 'libs/protobuf/' content from commit fcd3b9a85
git-subtree-dir: libs/protobuf git-subtree-split: fcd3b9a85ef36e46643dc30176cea1a7ad62e02b
This commit is contained in:
28
ruby/compatibility_tests/v3.0.0/Rakefile
Normal file
28
ruby/compatibility_tests/v3.0.0/Rakefile
Normal file
@@ -0,0 +1,28 @@
|
||||
require "rake/testtask"
|
||||
|
||||
# Proto for tests.
|
||||
genproto_output = []
|
||||
|
||||
unless ENV['BAZEL'] == 'true'
|
||||
genproto_output << "tests/generated_code.rb"
|
||||
genproto_output << "tests/test_import.rb"
|
||||
file "tests/generated_code.rb" => "tests/generated_code.proto" do |file_task|
|
||||
sh "./protoc --ruby_out=. tests/generated_code.proto"
|
||||
end
|
||||
|
||||
file "tests/test_import.rb" => "tests/test_import.proto" do |file_task|
|
||||
sh "./protoc --ruby_out=. tests/test_import.proto"
|
||||
end
|
||||
end
|
||||
|
||||
task :genproto => genproto_output
|
||||
|
||||
task :clean do
|
||||
sh "rm -f #{genproto_output.join(' ')}"
|
||||
end
|
||||
|
||||
Rake::TestTask.new(:test => :genproto) do |t|
|
||||
t.test_files = FileList["tests/*.rb"]
|
||||
end
|
||||
|
||||
task :default => [:test]
|
||||
Reference in New Issue
Block a user