From e301946ca460b6ad971798a9b69ed66681498114 Mon Sep 17 00:00:00 2001 From: Konstantin Podsvirov Date: Thu, 17 Sep 2015 12:08:47 +0300 Subject: Simplify testing from CMake project to "check" target --- .../protobuf/compiler/command_line_interface_unittest.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/google') 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]; -- cgit v1.2.3