aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/tests/InteropTestsLocalCleartext.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/objective-c/tests/InteropTestsLocalCleartext.m')
-rw-r--r--src/objective-c/tests/InteropTestsLocalCleartext.m6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/objective-c/tests/InteropTestsLocalCleartext.m b/src/objective-c/tests/InteropTestsLocalCleartext.m
index 94cdf85965..cdcdd8a88c 100644
--- a/src/objective-c/tests/InteropTestsLocalCleartext.m
+++ b/src/objective-c/tests/InteropTestsLocalCleartext.m
@@ -36,7 +36,11 @@
#import "InteropTests.h"
-static NSString * const kLocalCleartextHost = @"localhost:5050";
+// The server address is derived from preprocessor macro, which is
+// in turn derived from environment variable of the same name.
+#define NSStringize_helper(x) #x
+#define NSStringize(x) @NSStringize_helper(x)
+static NSString * const kLocalCleartextHost = NSStringize(HOST_PORT_LOCAL);
// The Protocol Buffers encoding overhead of local interop server. Acquired
// by experiment. Adjust this when server's proto file changes.