aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2017-05-04 15:24:55 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2017-05-04 15:24:55 -0700
commit3a5a0724f300e9c7de98851a0bbaaa4363981486 (patch)
treee535089d2063217a9d09a1412403ebc8d69f8eae
parent8859c07a35d9c2c02b6565627fbbc87c152cb731 (diff)
downloadprotobuf-3a5a0724f300e9c7de98851a0bbaaa4363981486.tar.gz
protobuf-3a5a0724f300e9c7de98851a0bbaaa4363981486.tar.bz2
protobuf-3a5a0724f300e9c7de98851a0bbaaa4363981486.zip
Skip C# test in C++ only distribution.
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_bootstrap_unittest.cc8
1 files changed, 8 insertions, 0 deletions
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);