Merge pull request #23683 from veblush/msan-fix2

Add TestEnvironment to tests
pull/23687/head
Esun Kim 4 years ago committed by GitHub
commit a68d80e147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      test/cpp/codegen/golden_file_test.cc
  2. 3
      test/cpp/codegen/proto_utils_test.cc
  3. 2
      test/cpp/qps/qps_json_driver.cc
  4. 2
      test/cpp/qps/worker.cc

@ -22,6 +22,7 @@
#include <gflags/gflags.h>
#include <gtest/gtest.h>
#include "test/core/util/test_config.h"
#include "test/cpp/util/test_config.h"
// In some distros, gflags is in the namespace google, and in some others,
@ -68,6 +69,7 @@ TEST(GoldenMockFileTest, TestGeneratedMockFile) {
}
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
grpc::testing::InitTest(&argc, &argv, true);
if (FLAGS_generated_file_path.empty()) {

@ -23,6 +23,8 @@
#include <grpcpp/impl/grpc_library.h>
#include <gtest/gtest.h>
#include "test/core/util/test_config.h"
namespace grpc {
namespace internal {
@ -187,6 +189,7 @@ TEST_F(WriterTest, LargeBlockLargeBackup) {
} // namespace grpc
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

@ -26,6 +26,7 @@
#include <gflags/gflags.h>
#include <grpc/support/log.h>
#include "test/core/util/test_config.h"
#include "test/cpp/qps/benchmark_config.h"
#include "test/cpp/qps/driver.h"
#include "test/cpp/qps/parse_json.h"
@ -290,6 +291,7 @@ static bool QpsDriver() {
} // namespace grpc
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
grpc::testing::InitTest(&argc, &argv, true);
bool ok = grpc::testing::QpsDriver();

@ -26,6 +26,7 @@
#include <grpc/grpc.h>
#include <grpc/support/time.h>
#include "test/core/util/test_config.h"
#include "test/cpp/qps/qps_worker.h"
#include "test/cpp/util/test_config.h"
#include "test/cpp/util/test_credentials_provider.h"
@ -57,6 +58,7 @@ static void RunServer() {
} // namespace grpc
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
grpc::testing::InitTest(&argc, &argv, true);
signal(SIGINT, sigint_handler);

Loading…
Cancel
Save