add API to get last modification time of a file

pull/24431/head
ZhenLian 4 years ago
parent 486989f250
commit d5d35650b0
  1. 4
      BUILD
  2. 4
      BUILD.gn
  3. 45
      CMakeLists.txt
  4. 2
      Makefile
  5. 18
      build_autogenerated.yaml
  6. 2
      config.m4
  7. 2
      config.w32
  8. 2
      gRPC-C++.podspec
  9. 4
      gRPC-Core.podspec
  10. 3
      grpc.gemspec
  11. 3
      grpc.gyp
  12. 10
      include/grpc/impl/codegen/port_platform.h
  13. 3
      package.xml
  14. 4
      src/core/lib/gprpp/README.md
  15. 38
      src/core/lib/gprpp/stat.h
  16. 49
      src/core/lib/gprpp/stat_posix.cc
  17. 48
      src/core/lib/gprpp/stat_windows.cc
  18. 2
      src/python/grpcio/grpc_core_dependencies.py
  19. 15
      test/core/gprpp/BUILD
  20. 74
      test/core/gprpp/stat_test.cc
  21. 3
      tools/doxygen/Doxyfile.c++.internal
  22. 3
      tools/doxygen/Doxyfile.core.internal
  23. 24
      tools/run_tests/generated/tests.json

@ -534,6 +534,8 @@ grpc_cc_library(
"src/core/lib/gprpp/global_config_env.cc",
"src/core/lib/gprpp/host_port.cc",
"src/core/lib/gprpp/mpscq.cc",
"src/core/lib/gprpp/stat_posix.cc",
"src/core/lib/gprpp/stat_windows.cc",
"src/core/lib/gprpp/thd_posix.cc",
"src/core/lib/gprpp/thd_windows.cc",
"src/core/lib/profiling/basic_timers.cc",
@ -567,6 +569,7 @@ grpc_cc_library(
"src/core/lib/gprpp/map.h",
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/mpscq.h",
"src/core/lib/gprpp/stat.h",
"src/core/lib/gprpp/sync.h",
"src/core/lib/gprpp/thd.h",
"src/core/lib/profiling/timers.h",
@ -574,6 +577,7 @@ grpc_cc_library(
external_deps = [
"absl/base",
"absl/memory",
"absl/status",
"absl/strings",
"absl/strings:str_format",
"absl/synchronization",

@ -161,6 +161,9 @@ config("grpc_config") {
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/mpscq.cc",
"src/core/lib/gprpp/mpscq.h",
"src/core/lib/gprpp/stat.h",
"src/core/lib/gprpp/stat_posix.cc",
"src/core/lib/gprpp/stat_windows.cc",
"src/core/lib/gprpp/sync.h",
"src/core/lib/gprpp/thd.h",
"src/core/lib/gprpp/thd_posix.cc",
@ -174,6 +177,7 @@ config("grpc_config") {
":absl/synchronization:synchronization",
":absl/strings:strings",
":absl/strings:str_format",
":absl/status:status",
":absl/memory:memory",
":absl/base:base",
]

@ -896,6 +896,7 @@ if(gRPC_BUILD_TESTS)
add_dependencies(buildtests_cxx settings_timeout_test)
add_dependencies(buildtests_cxx shutdown_test)
add_dependencies(buildtests_cxx simple_request_bad_client_test)
add_dependencies(buildtests_cxx stat_test)
add_dependencies(buildtests_cxx static_metadata_test)
add_dependencies(buildtests_cxx stats_test)
add_dependencies(buildtests_cxx status_metadata_test)
@ -1311,6 +1312,8 @@ add_library(gpr
src/core/lib/gprpp/global_config_env.cc
src/core/lib/gprpp/host_port.cc
src/core/lib/gprpp/mpscq.cc
src/core/lib/gprpp/stat_posix.cc
src/core/lib/gprpp/stat_windows.cc
src/core/lib/gprpp/thd_posix.cc
src/core/lib/gprpp/thd_windows.cc
src/core/lib/profiling/basic_timers.cc
@ -1351,6 +1354,7 @@ target_link_libraries(gpr
absl::synchronization
absl::strings
absl::str_format
absl::status
absl::memory
absl::base
)
@ -14240,6 +14244,45 @@ target_link_libraries(simple_request_bad_client_test
)
endif()
if(gRPC_BUILD_TESTS)
add_executable(stat_test
test/core/gprpp/stat_test.cc
third_party/googletest/googletest/src/gtest-all.cc
third_party/googletest/googlemock/src/gmock-all.cc
)
target_include_directories(stat_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(stat_test
${_gRPC_PROTOBUF_LIBRARIES}
${_gRPC_ALLTARGETS_LIBRARIES}
grpc_test_util
grpc
gpr
address_sorting
upb
${_gRPC_GFLAGS_LIBRARIES}
)
endif()
if(gRPC_BUILD_TESTS)
@ -16102,7 +16145,7 @@ generate_pkgconfig(
"gRPC platform support library"
"${gRPC_CORE_VERSION}"
""
"-lgpr -labsl_str_format_internal -labsl_bad_optional_access -labsl_synchronization -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_stacktrace -labsl_debugging_internal -labsl_malloc_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity"
"-lgpr -labsl_status -labsl_cord -labsl_str_format_internal -labsl_bad_optional_access -labsl_synchronization -labsl_graphcycles_internal -labsl_symbolize -labsl_demangle_internal -labsl_stacktrace -labsl_debugging_internal -labsl_malloc_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity"
""
"gpr.pc")

@ -1746,6 +1746,8 @@ LIBGPR_SRC = \
src/core/lib/gprpp/global_config_env.cc \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/mpscq.cc \
src/core/lib/gprpp/stat_posix.cc \
src/core/lib/gprpp/stat_windows.cc \
src/core/lib/gprpp/thd_posix.cc \
src/core/lib/gprpp/thd_windows.cc \
src/core/lib/profiling/basic_timers.cc \

@ -305,6 +305,7 @@ libs:
- src/core/lib/gprpp/map.h
- src/core/lib/gprpp/memory.h
- src/core/lib/gprpp/mpscq.h
- src/core/lib/gprpp/stat.h
- src/core/lib/gprpp/sync.h
- src/core/lib/gprpp/thd.h
- src/core/lib/profiling/timers.h
@ -346,6 +347,8 @@ libs:
- src/core/lib/gprpp/global_config_env.cc
- src/core/lib/gprpp/host_port.cc
- src/core/lib/gprpp/mpscq.cc
- src/core/lib/gprpp/stat_posix.cc
- src/core/lib/gprpp/stat_windows.cc
- src/core/lib/gprpp/thd_posix.cc
- src/core/lib/gprpp/thd_windows.cc
- src/core/lib/profiling/basic_timers.cc
@ -355,6 +358,7 @@ libs:
- absl/synchronization:synchronization
- absl/strings:strings
- absl/strings:str_format
- absl/status:status
- absl/memory:memory
- absl/base:base
secure: false
@ -7326,6 +7330,20 @@ targets:
corpus_dirs:
- test/core/security/corpus/ssl_server_corpus
maxlen: 2048
- name: stat_test
gtest: true
build: test
language: c++
headers: []
src:
- test/core/gprpp/stat_test.cc
deps:
- grpc_test_util
- grpc
- gpr
- address_sorting
- upb
uses_polling: false
- name: static_metadata_test
gtest: true
build: test

@ -376,6 +376,8 @@ if test "$PHP_GRPC" != "no"; then
src/core/lib/gprpp/global_config_env.cc \
src/core/lib/gprpp/host_port.cc \
src/core/lib/gprpp/mpscq.cc \
src/core/lib/gprpp/stat_posix.cc \
src/core/lib/gprpp/stat_windows.cc \
src/core/lib/gprpp/thd_posix.cc \
src/core/lib/gprpp/thd_windows.cc \
src/core/lib/http/format_request.cc \

@ -343,6 +343,8 @@ if (PHP_GRPC != "no") {
"src\\core\\lib\\gprpp\\global_config_env.cc " +
"src\\core\\lib\\gprpp\\host_port.cc " +
"src\\core\\lib\\gprpp\\mpscq.cc " +
"src\\core\\lib\\gprpp\\stat_posix.cc " +
"src\\core\\lib\\gprpp\\stat_windows.cc " +
"src\\core\\lib\\gprpp\\thd_posix.cc " +
"src\\core\\lib\\gprpp\\thd_windows.cc " +
"src\\core\\lib\\http\\format_request.cc " +

@ -507,6 +507,7 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
'src/core/lib/gprpp/stat.h',
'src/core/lib/gprpp/sync.h',
'src/core/lib/gprpp/thd.h',
'src/core/lib/http/format_request.h',
@ -1107,6 +1108,7 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
'src/core/lib/gprpp/stat.h',
'src/core/lib/gprpp/sync.h',
'src/core/lib/gprpp/thd.h',
'src/core/lib/http/format_request.h',

@ -834,6 +834,9 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
'src/core/lib/gprpp/stat.h',
'src/core/lib/gprpp/stat_posix.cc',
'src/core/lib/gprpp/stat_windows.cc',
'src/core/lib/gprpp/sync.h',
'src/core/lib/gprpp/thd.h',
'src/core/lib/gprpp/thd_posix.cc',
@ -1631,6 +1634,7 @@ Pod::Spec.new do |s|
'src/core/lib/gprpp/orphanable.h',
'src/core/lib/gprpp/ref_counted.h',
'src/core/lib/gprpp/ref_counted_ptr.h',
'src/core/lib/gprpp/stat.h',
'src/core/lib/gprpp/sync.h',
'src/core/lib/gprpp/thd.h',
'src/core/lib/http/format_request.h',

@ -752,6 +752,9 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/gprpp/orphanable.h )
s.files += %w( src/core/lib/gprpp/ref_counted.h )
s.files += %w( src/core/lib/gprpp/ref_counted_ptr.h )
s.files += %w( src/core/lib/gprpp/stat.h )
s.files += %w( src/core/lib/gprpp/stat_posix.cc )
s.files += %w( src/core/lib/gprpp/stat_windows.cc )
s.files += %w( src/core/lib/gprpp/sync.h )
s.files += %w( src/core/lib/gprpp/thd.h )
s.files += %w( src/core/lib/gprpp/thd_posix.cc )

@ -383,6 +383,7 @@
'absl/synchronization:synchronization',
'absl/strings:strings',
'absl/strings:str_format',
'absl/status:status',
'absl/memory:memory',
'absl/base:base',
],
@ -424,6 +425,8 @@
'src/core/lib/gprpp/global_config_env.cc',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/mpscq.cc',
'src/core/lib/gprpp/stat_posix.cc',
'src/core/lib/gprpp/stat_windows.cc',
'src/core/lib/gprpp/thd_posix.cc',
'src/core/lib/gprpp/thd_windows.cc',
'src/core/lib/profiling/basic_timers.cc',

@ -100,6 +100,7 @@
#define GPR_WINDOWS_TMPFILE
#define GPR_WINDOWS_LOG
#define GPR_WINDOWS_CRASH_HANDLER 1
#define GPR_WINDOWS_STAT
#define GPR_WINDOWS_STRING
#define GPR_WINDOWS_TIME
#endif
@ -126,6 +127,7 @@
#define GPR_STDCPP_TLS 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_ANDROID_LOG 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
@ -154,6 +156,7 @@
#define GPR_SUPPORT_CHANNELS_FROM_FD 1
#define GPR_LINUX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@ -216,6 +219,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@ -242,6 +246,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@ -266,6 +271,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@ -287,6 +293,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@ -310,6 +317,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@ -339,6 +347,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@ -365,6 +374,7 @@
#define GPR_POSIX_SYNC 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
#define GPR_POSIX_STAT 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
#define GPR_POSIX_STRING 1

@ -732,6 +732,9 @@
<file baseinstalldir="/" name="src/core/lib/gprpp/orphanable.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/ref_counted.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/ref_counted_ptr.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/stat.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/stat_posix.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/stat_windows.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/sync.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/thd.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/gprpp/thd_posix.cc" role="src" />

@ -6,7 +6,3 @@ for other open source projects written in C++.
Note that this is one of the few places in src/core where we allow
the use of portability macros.
Note that this is the only place in src/core where we allow
use of the C++ standard library (i.e., anything in the `std::`
namespace).

@ -0,0 +1,38 @@
//
// Copyright 2020 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#ifndef GRPC_CORE_LIB_GPRPP_STAT_H
#define GRPC_CORE_LIB_GPRPP_STAT_H
#include <grpc/support/port_platform.h>
#include <stdio.h>
#include <time.h>
#include "absl/status/status.h"
#include "absl/strings/string_view.h"
namespace grpc_core {
// Gets the last-modified timestamp of a file or a directory.
// On success, the correct timestamp will be filled with an StatusCode::kOk
// returned. Otherwise, timestamp will be untouched and an
// StatusCode::kInternal will be returned.
absl::Status GetFileModificationTime(const char* filename, time_t* timestamp);
} // namespace grpc_core
#endif // GRPC_CORE_LIB_GPRPP_STAT_H

@ -0,0 +1,49 @@
//
// Copyright 2020 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <grpc/support/port_platform.h>
#ifdef GPR_POSIX_STAT
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <grpc/support/log.h>
#include "src/core/lib/gprpp/stat.h"
namespace grpc_core {
absl::Status GetFileModificationTime(const char* filename, time_t* timestamp) {
GPR_ASSERT(filename != nullptr);
GPR_ASSERT(timestamp != nullptr);
struct stat buf;
if (stat(filename, &buf) != 0) {
const char* error_msg = strerror(errno);
gpr_log(GPR_ERROR, "stat failed for filename %s with error %s.", filename,
error_msg);
return absl::Status(absl::StatusCode::kInternal, error_msg);
}
// Last file/directory modification time.
*timestamp = buf.st_mtime;
return absl::OkStatus();
}
} // namespace grpc_core
#endif // GPR_POSIX_STAT

@ -0,0 +1,48 @@
//
// Copyright 2020 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <grpc/support/port_platform.h>
#ifdef GPR_WINDOWS_STAT
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <grpc/support/log.h>
#include "src/core/lib/gprpp/stat.h"
namespace grpc_core {
absl::Status GetFileModificationTime(const char* filename, time_t* timestamp) {
GPR_ASSERT(filename != nullptr);
GPR_ASSERT(timestamp != nullptr);
struct _stat buf;
if (_stat(filename, &buf) != 0) {
const char* error_msg = strerror(errno);
gpr_log(GPR_ERROR, "_stat failed for filename %s with error %s.", filename,
error_msg);
return absl::Status(absl::StatusCode::kInternal, error_msg);
}
// Last file/directory modification time.
*timestamp = buf.st_mtime;
return absl::OkStatus();
}
} // namespace grpc_core
#endif // GPR_WINDOWS_STAT

@ -352,6 +352,8 @@ CORE_SOURCE_FILES = [
'src/core/lib/gprpp/global_config_env.cc',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/mpscq.cc',
'src/core/lib/gprpp/stat_posix.cc',
'src/core/lib/gprpp/stat_windows.cc',
'src/core/lib/gprpp/thd_posix.cc',
'src/core/lib/gprpp/thd_windows.cc',
'src/core/lib/http/format_request.cc',

@ -159,3 +159,18 @@ grpc_cc_test(
"//test/core/util:grpc_test_util",
],
)
grpc_cc_test(
name = "stat_test",
srcs = ["stat_test.cc"],
external_deps = [
"gtest",
],
language = "C++",
uses_polling = False,
deps = [
"//:gpr",
"//:grpc",
"//test/core/util:grpc_test_util",
],
)

@ -0,0 +1,74 @@
//
// Copyright 2020 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include <stdio.h>
#include <string.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <grpc/grpc.h>
#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/tmpfile.h"
#include "src/core/lib/gprpp/stat.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/test_config.h"
namespace grpc_core {
namespace testing {
namespace {
TEST(STAT, GetTimestampOnTmpFile) {
// Create a temporary empty file.
FILE* tmp = nullptr;
char* tmp_name;
tmp = gpr_tmpfile("prefix", &tmp_name);
ASSERT_NE(tmp_name, nullptr);
ASSERT_NE(tmp, nullptr);
fclose(tmp);
// Check the last modified date is correctly set.
time_t timestamp = 0;
absl::Status status =
grpc_core::GetFileModificationTime(tmp_name, &timestamp);
EXPECT_EQ(status.code(), absl::StatusCode::kOk);
EXPECT_GT(timestamp, 0);
// Clean up.
remove(tmp_name);
gpr_free(tmp_name);
}
TEST(STAT, GetTimestampOnFailure) {
time_t timestamp = 0;
absl::Status status =
grpc_core::GetFileModificationTime("/DOES_NOT_EXIST", &timestamp);
EXPECT_EQ(status.code(), absl::StatusCode::kInternal);
// Check the last modified date is not set.
EXPECT_EQ(timestamp, 0);
}
} // namespace
} // namespace testing
} // namespace grpc_core
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

@ -1684,6 +1684,9 @@ src/core/lib/gprpp/mpscq.h \
src/core/lib/gprpp/orphanable.h \
src/core/lib/gprpp/ref_counted.h \
src/core/lib/gprpp/ref_counted_ptr.h \
src/core/lib/gprpp/stat.h \
src/core/lib/gprpp/stat_posix.cc \
src/core/lib/gprpp/stat_windows.cc \
src/core/lib/gprpp/sync.h \
src/core/lib/gprpp/thd.h \
src/core/lib/gprpp/thd_posix.cc \

@ -1525,6 +1525,9 @@ src/core/lib/gprpp/mpscq.h \
src/core/lib/gprpp/orphanable.h \
src/core/lib/gprpp/ref_counted.h \
src/core/lib/gprpp/ref_counted_ptr.h \
src/core/lib/gprpp/stat.h \
src/core/lib/gprpp/stat_posix.cc \
src/core/lib/gprpp/stat_windows.cc \
src/core/lib/gprpp/sync.h \
src/core/lib/gprpp/thd.h \
src/core/lib/gprpp/thd_posix.cc \

@ -5667,6 +5667,30 @@
],
"uses_polling": true
},
{
"args": [],
"benchmark": false,
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"gtest": true,
"language": "c++",
"name": "stat_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
],
"uses_polling": false
},
{
"args": [],
"benchmark": false,

Loading…
Cancel
Save