aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Adele Zhou <adelez@google.com>2017-11-29 16:25:17 -0800
committerGravatar Adele Zhou <adelez@google.com>2017-11-30 17:45:02 -0800
commit5b7cdefb681977357573d9eac866520610d19fa5 (patch)
tree45411f6060a9c97be5db23f53ef8639b30d7b4a1
parente5df91f477a27ce71a39bca928677b2f08649615 (diff)
Rename port_hermetic to port_isolated_runtime_environment
-rw-r--r--BUILD2
-rw-r--r--CMakeLists.txt4
-rw-r--r--Makefile4
-rw-r--r--bazel/grpc_build_system.bzl2
-rw-r--r--build.yaml2
-rw-r--r--grpc.gyp4
-rw-r--r--test/core/util/BUILD2
-rw-r--r--test/core/util/port_isolated_runtime_environment.cc (renamed from test/core/util/port_hermetic.cc)13
-rw-r--r--test/core/util/test_config.h2
-rw-r--r--tools/internal_ci/linux/grpc_bazel_on_foundry.sh5
-rw-r--r--tools/run_tests/generated/sources_and_headers.json4
11 files changed, 22 insertions, 22 deletions
diff --git a/BUILD b/BUILD
index d997dc253c..2dd8db0699 100644
--- a/BUILD
+++ b/BUILD
@@ -40,7 +40,7 @@ config_setting(
config_setting(
name = "remote_execution",
- values = {"define": "GRPC_HERMETIC_TESTS=1"},
+ values = {"define": "GRPC_PORT_ISOLATED_RUNTIME=1"},
)
# This should be updated along with build.yaml
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3bb627aa7d..975c297505 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1622,7 +1622,7 @@ add_library(grpc_test_util
test/core/util/parse_hexstring.cc
test/core/util/passthru_endpoint.cc
test/core/util/port.cc
- test/core/util/port_hermetic.cc
+ test/core/util/port_isolated_runtime_environment.cc
test/core/util/port_server_client.cc
test/core/util/slice_splitter.cc
test/core/util/tracer_util.cc
@@ -1891,7 +1891,7 @@ add_library(grpc_test_util_unsecure
test/core/util/parse_hexstring.cc
test/core/util/passthru_endpoint.cc
test/core/util/port.cc
- test/core/util/port_hermetic.cc
+ test/core/util/port_isolated_runtime_environment.cc
test/core/util/port_server_client.cc
test/core/util/slice_splitter.cc
test/core/util/tracer_util.cc
diff --git a/Makefile b/Makefile
index f5106cb265..6b8116dda9 100644
--- a/Makefile
+++ b/Makefile
@@ -3628,7 +3628,7 @@ LIBGRPC_TEST_UTIL_SRC = \
test/core/util/parse_hexstring.cc \
test/core/util/passthru_endpoint.cc \
test/core/util/port.cc \
- test/core/util/port_hermetic.cc \
+ test/core/util/port_isolated_runtime_environment.cc \
test/core/util/port_server_client.cc \
test/core/util/slice_splitter.cc \
test/core/util/tracer_util.cc \
@@ -3888,7 +3888,7 @@ LIBGRPC_TEST_UTIL_UNSECURE_SRC = \
test/core/util/parse_hexstring.cc \
test/core/util/passthru_endpoint.cc \
test/core/util/port.cc \
- test/core/util/port_hermetic.cc \
+ test/core/util/port_isolated_runtime_environment.cc \
test/core/util/port_server_client.cc \
test/core/util/slice_splitter.cc \
test/core/util/tracer_util.cc \
diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl
index a6da377248..2ee8c297da 100644
--- a/bazel/grpc_build_system.bzl
+++ b/bazel/grpc_build_system.bzl
@@ -35,7 +35,7 @@ def grpc_cc_library(name, srcs = [], public_hdrs = [], hdrs = [],
srcs = srcs,
defines = select({"//:grpc_no_ares": ["GRPC_ARES=0"],
"//conditions:default": [],}) +
- select({"//:remote_execution": ["GRPC_HERMETIC_TESTS=1"],
+ select({"//:remote_execution": ["GRPC_PORT_ISOLATED_RUNTIME=1"],
"//conditions:default": [],}),
hdrs = hdrs + public_hdrs,
deps = deps + ["//external:" + dep for dep in external_deps],
diff --git a/build.yaml b/build.yaml
index 0f6ac5631c..df2975fcc2 100644
--- a/build.yaml
+++ b/build.yaml
@@ -736,7 +736,7 @@ filegroups:
- test/core/util/parse_hexstring.cc
- test/core/util/passthru_endpoint.cc
- test/core/util/port.cc
- - test/core/util/port_hermetic.cc
+ - test/core/util/port_isolated_runtime_environment.cc
- test/core/util/port_server_client.cc
- test/core/util/slice_splitter.cc
- test/core/util/tracer_util.cc
diff --git a/grpc.gyp b/grpc.gyp
index 7e6a06c876..b07696d316 100644
--- a/grpc.gyp
+++ b/grpc.gyp
@@ -511,7 +511,7 @@
'test/core/util/parse_hexstring.cc',
'test/core/util/passthru_endpoint.cc',
'test/core/util/port.cc',
- 'test/core/util/port_hermetic.cc',
+ 'test/core/util/port_isolated_runtime_environment.cc',
'test/core/util/port_server_client.cc',
'test/core/util/slice_splitter.cc',
'test/core/util/tracer_util.cc',
@@ -722,7 +722,7 @@
'test/core/util/parse_hexstring.cc',
'test/core/util/passthru_endpoint.cc',
'test/core/util/port.cc',
- 'test/core/util/port_hermetic.cc',
+ 'test/core/util/port_isolated_runtime_environment.cc',
'test/core/util/port_server_client.cc',
'test/core/util/slice_splitter.cc',
'test/core/util/tracer_util.cc',
diff --git a/test/core/util/BUILD b/test/core/util/BUILD
index f92c0ff548..89e07c83c7 100644
--- a/test/core/util/BUILD
+++ b/test/core/util/BUILD
@@ -53,7 +53,7 @@ grpc_cc_library(
"parse_hexstring.cc",
"passthru_endpoint.cc",
"port.cc",
- "port_hermetic.cc",
+ "port_isolated_runtime_environment.cc",
"port_server_client.cc",
"reconnect_server.cc",
"slice_splitter.cc",
diff --git a/test/core/util/port_hermetic.cc b/test/core/util/port_isolated_runtime_environment.cc
index b4d097f650..5f0585e9fb 100644
--- a/test/core/util/port_hermetic.cc
+++ b/test/core/util/port_isolated_runtime_environment.cc
@@ -16,13 +16,12 @@
*
*/
-/* When running tests hermeticly, i.e. running on remote machines,
- * the framework takes a round-robin pick of a port within certain range.
- * There is no need to recycle ports.
+/* When running tests on remote machines, the framework takes a round-robin pick
+ * of a port within certain range. There is no need to recycle ports.
*/
#include "src/core/lib/iomgr/port.h"
#include "test/core/util/test_config.h"
-#if defined(GRPC_HERMETIC_TESTS)
+#if defined(GRPC_PORT_ISOLATED_RUNTIME)
#include "test/core/util/port.h"
@@ -38,8 +37,6 @@ int grpc_pick_unused_port_or_die(void) {
return allocated_port;
}
-void grpc_recycle_unused_port(int port) {
- (void) port;
-}
+void grpc_recycle_unused_port(int port) { (void)port; }
-#endif /* GRPC_HERMETIC_TESTS */
+#endif /* GRPC_PORT_ISOLATED_RUNTIME */
diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h
index ee60441653..5b3d34799e 100644
--- a/test/core/util/test_config.h
+++ b/test/core/util/test_config.h
@@ -33,7 +33,7 @@ gpr_timespec grpc_timeout_seconds_to_deadline(int64_t time_s);
/* Converts a given timeout (in milliseconds) to a deadline. */
gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms);
-#if !defined(GRPC_TEST_CUSTOM_PICK_PORT) && !defined(GRPC_HERMETIC_TESTS)
+#if !defined(GRPC_TEST_CUSTOM_PICK_PORT) && !defined(GRPC_PORT_ISOLATED_RUNTIME)
#define GRPC_TEST_PICK_PORT
#endif
diff --git a/tools/internal_ci/linux/grpc_bazel_on_foundry.sh b/tools/internal_ci/linux/grpc_bazel_on_foundry.sh
index dc6df47ac8..e328be8aab 100644
--- a/tools/internal_ci/linux/grpc_bazel_on_foundry.sh
+++ b/tools/internal_ci/linux/grpc_bazel_on_foundry.sh
@@ -15,6 +15,9 @@
set -ex
+# A temporary solution to give Kokoro credentials.
+# The file name 4321_grpc-testing-service needs to match auth_credential in
+# the build config.
mkdir -p ${KOKORO_KEYSTORE_DIR}
cp ${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json ${KOKORO_KEYSTORE_DIR}/4321_grpc-testing-service
@@ -48,5 +51,5 @@ source tools/internal_ci/helper_scripts/prepare_build_linux_rc
--experimental_strict_action_env=true \
--experimental_remote_platform_override='properties:{name:"container-image" value:"docker://gcr.io/asci-toolchain/nosla-debian8-clang-fl@sha256:aa20628a902f06a11a015caa94b0432eb60690de2d2525bd046b9eea046f5d8a" }' \
--crosstool_top=@bazel_toolchains//configs/debian8_clang/0.2.0/bazel_0.7.0:toolchain \
- --define GRPC_HERMETIC_TESTS=1 \
+ --define GRPC_PORT_ISOLATED_RUNTIME=1 \
-- //test/...
diff --git a/tools/run_tests/generated/sources_and_headers.json b/tools/run_tests/generated/sources_and_headers.json
index c957638181..025077449f 100644
--- a/tools/run_tests/generated/sources_and_headers.json
+++ b/tools/run_tests/generated/sources_and_headers.json
@@ -8932,8 +8932,7 @@
"test/core/util/mock_endpoint.h",
"test/core/util/parse_hexstring.h",
"test/core/util/passthru_endpoint.h",
- "test/core/util/port.h",
- "test/core/util/port_hermetic.cc",
+ "test/core/util/port.h",
"test/core/util/port_server_client.h",
"test/core/util/slice_splitter.h",
"test/core/util/tracer_util.h",
@@ -8967,6 +8966,7 @@
"test/core/util/passthru_endpoint.h",
"test/core/util/port.cc",
"test/core/util/port.h",
+ "test/core/util/port_isolated_runtime_environment.cc",
"test/core/util/port_server_client.cc",
"test/core/util/port_server_client.h",
"test/core/util/slice_splitter.cc",