From 3a5a0724f300e9c7de98851a0bbaaa4363981486 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Thu, 4 May 2017 15:24:55 -0700 Subject: Skip C# test in C++ only distribution. --- src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc b/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc index 4e44b578..5c54270e 100644 --- a/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc +++ b/src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc @@ -134,6 +134,14 @@ class GenerateAndTest { }; TEST(CsharpBootstrapTest, GeneratedCsharpDescriptorMatches) { + // Skip this whole test if the csharp directory doesn't exist (i.e., a C++11 + // only distribution). + string descriptor_file_name = + "../csharp/src/Google.Protobuf/Reflection/Descriptor.cs"; + if (!File::Exists(TestSourceDir() + "/" + descriptor_file_name)) { + return; + } + MockErrorCollector error_collector; DiskSourceTree source_tree; Importer importer(&source_tree, &error_collector); -- cgit v1.2.3