aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2015-09-17 12:08:47 +0300
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2015-09-17 12:08:47 +0300
commite301946ca460b6ad971798a9b69ed66681498114 (patch)
tree291783e972d50676659178483df25ea30e9c045c /src
parentd41601c249ff377e19d2bc76521cebe96e73a610 (diff)
downloadprotobuf-e301946ca460b6ad971798a9b69ed66681498114.tar.gz
protobuf-e301946ca460b6ad971798a9b69ed66681498114.tar.bz2
protobuf-e301946ca460b6ad971798a9b69ed66681498114.zip
Simplify testing from CMake project to "check" target
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/compiler/command_line_interface_unittest.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc
index 3935de51..18102f4d 100644
--- a/src/google/protobuf/compiler/command_line_interface_unittest.cc
+++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc
@@ -294,6 +294,10 @@ void CommandLineInterfaceTest::Run(const string& command) {
if (!disallow_plugins_) {
cli_.AllowPlugins("prefix-");
#ifndef GOOGLE_THIRD_PARTY_PROTOBUF
+ string plugin_path;
+#ifdef GOOGLE_PROTOBUF_TEST_PLUGIN_PATH
+ plugin_path = GOOGLE_PROTOBUF_TEST_PLUGIN_PATH;
+#else
const char* possible_paths[] = {
// When building with shared libraries, libtool hides the real executable
// in .libs and puts a fake wrapper in the current directory.
@@ -311,12 +315,6 @@ void CommandLineInterfaceTest::Run(const string& command) {
"test_plugin.exe", // Other Win32 (MSVC)
"test_plugin", // Unix
};
-
- string plugin_path;
-
-#ifdef GOOGLE_PROTOBUF_TEST_PLUGIN_PATH
- plugin_path = GOOGLE_PROTOBUF_TEST_PLUGIN_PATH;
-#else
for (int i = 0; i < GOOGLE_ARRAYSIZE(possible_paths); i++) {
if (access(possible_paths[i], F_OK) == 0) {
plugin_path = possible_paths[i];