|
|
@ -22,6 +22,13 @@ |
|
|
|
#include <gflags/gflags.h> |
|
|
|
#include <gflags/gflags.h> |
|
|
|
#include <gtest/gtest.h> |
|
|
|
#include <gtest/gtest.h> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// In some distros, gflags is in the namespace google, and in some others,
|
|
|
|
|
|
|
|
// in gflags. This hack is enabling us to find both.
|
|
|
|
|
|
|
|
namespace google {} |
|
|
|
|
|
|
|
namespace gflags {} |
|
|
|
|
|
|
|
using namespace google; |
|
|
|
|
|
|
|
using namespace gflags; |
|
|
|
|
|
|
|
|
|
|
|
DEFINE_string( |
|
|
|
DEFINE_string( |
|
|
|
generated_file_path, "", |
|
|
|
generated_file_path, "", |
|
|
|
"path to the directory containing generated files compiler_test.grpc.pb.h" |
|
|
|
"path to the directory containing generated files compiler_test.grpc.pb.h" |
|
|
@ -60,7 +67,7 @@ TEST(GoldenMockFileTest, TestGeneratedMockFile) { |
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char** argv) { |
|
|
|
int main(int argc, char** argv) { |
|
|
|
::testing::InitGoogleTest(&argc, argv); |
|
|
|
::testing::InitGoogleTest(&argc, argv); |
|
|
|
::google::ParseCommandLineFlags(&argc, &argv, true); |
|
|
|
ParseCommandLineFlags(&argc, &argv, true); |
|
|
|
if (FLAGS_generated_file_path.empty()) { |
|
|
|
if (FLAGS_generated_file_path.empty()) { |
|
|
|
FLAGS_generated_file_path = "gens/src/proto/grpc/testing/"; |
|
|
|
FLAGS_generated_file_path = "gens/src/proto/grpc/testing/"; |
|
|
|
} |
|
|
|
} |
|
|
|