Some fixes to make the tests pass on Bazel.

pull/7344/head
Joshua Haberman 5 years ago
parent 6e229f124e
commit 243558921f
  1. 1
      BUILD
  2. 3
      src/google/protobuf/compiler/command_line_interface.cc

@ -524,6 +524,7 @@ RELATIVE_TEST_PROTOS = [
"google/protobuf/unittest_proto3_arena.proto",
"google/protobuf/unittest_proto3_arena_lite.proto",
"google/protobuf/unittest_proto3_lite.proto",
"google/protobuf/unittest_proto3_optional.proto",
"google/protobuf/unittest_well_known_types.proto",
"google/protobuf/util/internal/testdata/anys.proto",
"google/protobuf/util/internal/testdata/books.proto",

@ -1105,6 +1105,9 @@ PopulateSingleSimpleDescriptorDatabase(const std::string& descriptor_set_name) {
bool CommandLineInterface::AllowProto3Optional(
const FileDescriptor& file) const {
if (allow_proto3_optional_) return true;
if (file.name() == "google/protobuf/unittest_proto3_optional.proto") {
return true;
}
return false;
}

Loading…
Cancel
Save