From 0a05b782fe0acdd4d5d14ee486baf51d779449c7 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Tue, 6 Mar 2018 17:13:06 -0800 Subject: Move python DNS utilities to utils subdirectory --- .../cpp/naming/resolver_component_tests_defs.include | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'templates/test') diff --git a/templates/test/cpp/naming/resolver_component_tests_defs.include b/templates/test/cpp/naming/resolver_component_tests_defs.include index 8faabafc79..4589ced8c9 100644 --- a/templates/test/cpp/naming/resolver_component_tests_defs.include +++ b/templates/test/cpp/naming/resolver_component_tests_defs.include @@ -21,11 +21,11 @@ set -ex FLAGS_test_bin_path=$(echo "$1" | grep '\--test_bin_path=' | cut -d "=" -f 2) FLAGS_dns_server_bin_path=$(echo "$2" | grep '\--dns_server_bin_path=' | cut -d "=" -f 2) FLAGS_records_config_path=$(echo "$3" | grep '\--records_config_path=' | cut -d "=" -f 2) -FLAGS_test_dns_server_port=$(echo "$4" | grep '\--test_dns_server_port=' | cut -d "=" -f 2) -FLAGS_test_dns_resolver_bin_path=$(echo "$5" | grep '\--test_dns_resolver_bin_path=' | cut -d "=" -f 2) -FLAGS_test_tcp_connect_bin_path=$(echo "$6" | grep '\--test_tcp_connect_bin_path=' | cut -d "=" -f 2) +FLAGS_dns_server_port=$(echo "$4" | grep '\--dns_server_port=' | cut -d "=" -f 2) +FLAGS_dns_resolver_bin_path=$(echo "$5" | grep '\--dns_resolver_bin_path=' | cut -d "=" -f 2) +FLAGS_tcp_connect_bin_path=$(echo "$6" | grep '\--tcp_connect_bin_path=' | cut -d "=" -f 2) -for cmd_arg in "$FLAGS_test_bin_path" "$FLAGS_dns_server_bin_path" "$FLAGS_records_config_path" "$FLAGS_test_dns_server_port" "$FLAGS_test_dns_resolver_bin_path" "$FLAGS_test_tcp_connect_bin_path"; do +for cmd_arg in "$FLAGS_test_bin_path" "$FLAGS_dns_server_bin_path" "$FLAGS_records_config_path" "$FLAGS_dns_server_port" "$FLAGS_dns_resolver_bin_path" "$FLAGS_tcp_connect_bin_path"; do if [[ "$cmd_arg" == "" ]]; then echo "Missing a CMD arg" && exit 1 fi @@ -36,7 +36,7 @@ if [[ "$GRPC_DNS_RESOLVER" != "" && "$GRPC_DNS_RESOLVER" != ares ]]; then fi export GRPC_DNS_RESOLVER=ares -"$FLAGS_dns_server_bin_path" --records_config_path="$FLAGS_records_config_path" --port="$FLAGS_test_dns_server_port" > /dev/null 2>&1 & +"$FLAGS_dns_server_bin_path" --records_config_path="$FLAGS_records_config_path" --port="$FLAGS_dns_server_port" > /dev/null 2>&1 & DNS_SERVER_PID=$! echo "Local DNS server started. PID: $DNS_SERVER_PID" @@ -45,8 +45,8 @@ for ((i=0;i<30;i++)); do echo "Retry health-check local DNS server by attempting a DNS query and TCP handshake" RETRY=0 - $FLAGS_test_dns_resolver_bin_path -s 127.0.0.1 -p "$FLAGS_test_dns_server_port" -n health-check-local-dns-server-is-alive.resolver-tests.grpctestingexp. -t 1 | grep '123.123.123.123' || RETRY=1 - $FLAGS_test_tcp_connect_bin_path -s 127.0.0.1 -p "$FLAGS_test_dns_server_port" -t 1 || RETRY=1 + $FLAGS_dns_resolver_bin_path -s 127.0.0.1 -p "$FLAGS_dns_server_port" -n health-check-local-dns-server-is-alive.resolver-tests.grpctestingexp. -t 1 | grep '123.123.123.123' || RETRY=1 + $FLAGS_tcp_connect_bin_path -s 127.0.0.1 -p "$FLAGS_dns_server_port" -t 1 || RETRY=1 if [[ "$RETRY" == 0 ]]; then break fi; @@ -85,7 +85,7 @@ $FLAGS_test_bin_path \\ --expected_lb_policy='${test['expected_lb_policy']}' \\ - --local_dns_server_address="127.0.0.1:$FLAGS_test_dns_server_port" & + --local_dns_server_address="127.0.0.1:$FLAGS_dns_server_port" & wait "$!" || EXIT_CODE=1 % endfor -- cgit v1.2.3