Index: third_party/protobuf/conformance/conformance_test_runner.cc |
diff --git a/third_party/protobuf/conformance/conformance_test_runner.cc b/third_party/protobuf/conformance/conformance_test_runner.cc |
index 376a60b9aa6edf1ff9e459ab0f83815a1ad36ee8..7e91d388b0d6ebf884971add99f43e1dc58de4d2 100644 |
--- a/third_party/protobuf/conformance/conformance_test_runner.cc |
+++ b/third_party/protobuf/conformance/conformance_test_runner.cc |
@@ -251,6 +251,16 @@ void UsageError() { |
" should contain one test name per\n"); |
fprintf(stderr, |
" line. Use '#' for comments.\n"); |
+ fprintf(stderr, |
+ " --enforce_recommended Enforce that recommended test\n"); |
+ fprintf(stderr, |
+ " cases are also passing. Specify\n"); |
+ fprintf(stderr, |
+ " this flag if you want to be\n"); |
+ fprintf(stderr, |
+ " strictly conforming to protobuf\n"); |
+ fprintf(stderr, |
+ " spec.\n"); |
exit(1); |
} |
@@ -280,14 +290,18 @@ int main(int argc, char *argv[]) { |
char *program; |
google::protobuf::ConformanceTestSuite suite; |
+ string failure_list_filename; |
vector<string> failure_list; |
for (int arg = 1; arg < argc; ++arg) { |
if (strcmp(argv[arg], "--failure_list") == 0) { |
if (++arg == argc) UsageError(); |
+ failure_list_filename = argv[arg]; |
ParseFailureList(argv[arg], &failure_list); |
} else if (strcmp(argv[arg], "--verbose") == 0) { |
suite.SetVerbose(true); |
+ } else if (strcmp(argv[arg], "--enforce_recommended") == 0) { |
+ suite.SetEnforceRecommended(true); |
} else if (argv[arg][0] == '-') { |
fprintf(stderr, "Unknown option: %s\n", argv[arg]); |
UsageError(); |
@@ -300,7 +314,7 @@ int main(int argc, char *argv[]) { |
} |
} |
- suite.SetFailureList(failure_list); |
+ suite.SetFailureList(failure_list_filename, failure_list); |
ForkPipeRunner runner(program); |
std::string output; |