aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/compiler
diff options
context:
space:
mode:
authorGravatar Bo Yang <paulyang1211@gmail.com>2015-02-04 10:20:20 -0800
committerGravatar Bo Yang <paulyang1211@gmail.com>2015-02-04 10:20:20 -0800
commita1b351c55bee819fc69861b3d0d88dab7dce0c4f (patch)
treefeaaa5bb91aebb52113c290e1ce258d2a27844b1 /src/google/protobuf/compiler
parent5fa3956edef4648fa14da81958330b6df59cdb6d (diff)
Change flag for generating dependency file to "dependency_out". Delete
test-driver
Diffstat (limited to 'src/google/protobuf/compiler')
-rw-r--r--src/google/protobuf/compiler/command_line_interface.cc4
-rw-r--r--src/google/protobuf/compiler/command_line_interface.h4
-rw-r--r--src/google/protobuf/compiler/command_line_interface_unittest.cc15
3 files changed, 12 insertions, 11 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 1a182f73..4b28cf6b 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -1020,7 +1020,7 @@ CommandLineInterface::InterpretArgument(const string& name,
}
descriptor_set_name_ = value;
- } else if (name == "--dependency_manifest_out") {
+ } else if (name == "--dependency_out") {
if (!dependency_manifest_name_.empty()) {
cerr << name << " may only be passed once." << endl;
return PARSE_ARGUMENT_FAIL;
@@ -1230,7 +1230,7 @@ void CommandLineInterface::PrintHelpText() {
" include information about the original\n"
" location of each decl in the source file as\n"
" well as surrounding comments.\n"
-" --manifest_file=FILE Write a dependency output file in the format\n"
+" --dependency_out=FILE Write a dependency output file in the format\n"
" expected by make. This writes the transitive\n"
" set of input file paths to FILE\n"
" --error_format=FORMAT Set the format in which to print errors.\n"
diff --git a/src/google/protobuf/compiler/command_line_interface.h b/src/google/protobuf/compiler/command_line_interface.h
index 0c951a71..13e93c54 100644
--- a/src/google/protobuf/compiler/command_line_interface.h
+++ b/src/google/protobuf/compiler/command_line_interface.h
@@ -358,8 +358,8 @@ class LIBPROTOC_EXPORT CommandLineInterface {
// FileDescriptorSet should be written. Otherwise, empty.
string descriptor_set_name_;
- // If --dependency_manifest_out was given, this is the filename to which the
- // input file should be written. Otherwise, empty.
+ // If --dependency_out was given, this is the filename to which the input file
+ // should be written. Otherwise, empty.
string dependency_manifest_name_;
// True if --include_imports was given, meaning that we should
diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc
index e7cfff6b..f298be75 100644
--- a/src/google/protobuf/compiler/command_line_interface_unittest.cc
+++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc
@@ -112,12 +112,13 @@ class CommandLineInterfaceTest : public testing::Test {
// Create a subdirectory within temp_directory_.
void CreateTempDir(const string& name);
- void SetInputsAreProtoPathRelative(bool enable) {
- cli_.SetInputsAreProtoPathRelative(enable);
+ // Change working directory to temp directory.
+ void SwitchToTempDirectory() {
+ File::ChangeWorkingDirectory(temp_directory_);
}
- string GetTempDirectory() {
- return temp_directory_;
+ void SetInputsAreProtoPathRelative(bool enable) {
+ cli_.SetInputsAreProtoPathRelative(enable);
}
// -----------------------------------------------------------------
@@ -969,7 +970,7 @@ TEST_F(CommandLineInterfaceTest, WriteDependencyManifestFile) {
" optional Foo foo = 1;\n"
"}\n");
- Run("protocol_compiler --dependency_manifest_out=$tmpdir/manifest "
+ Run("protocol_compiler --dependency_out=$tmpdir/manifest "
"--test_out=$tmpdir --proto_path=$tmpdir bar.proto");
ExpectNoErrors();
@@ -991,9 +992,9 @@ TEST_F(CommandLineInterfaceTest, WriteDependencyManifestFileForRelativePath) {
"}\n");
string current_working_directory = get_current_dir_name();
- File::ChangeWorkingDirectory(GetTempDirectory());
+ SwitchToTempDirectory();
- Run("protocol_compiler --dependency_manifest_out=manifest "
+ Run("protocol_compiler --dependency_out=manifest "
"--test_out=$tmpdir --proto_path=$tmpdir bar.proto");
ExpectNoErrors();