1#!/usr/bin/env python 2# Copyright 2015 gRPC authors. 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15 16import os 17import subprocess 18import sys 19 20# The c-ares test suite doesn't get ran regularly on Windows, but 21# this script provides a way to run a lot of the tests manually. 22_MSBUILD_CONFIG = os.environ["CONFIG"] 23os.chdir(os.path.join("..", "..", os.getcwd())) 24# This port is arbitrary, but it needs to be available. 25_DNS_SERVER_PORT = 15353 26 27subprocess.call( 28 [ 29 sys.executable, 30 "test\\cpp\\naming\\resolver_component_tests_runner.py", 31 "--test_bin_path", 32 "cmake\\build\\%s\\resolver_component_test.exe" % _MSBUILD_CONFIG, 33 "--dns_server_bin_path", 34 "test\\cpp\\naming\\utils\\dns_server.py", 35 "--records_config_path", 36 "test\\cpp\\naming\\resolver_test_record_groups.yaml", 37 "--dns_server_port", 38 str(_DNS_SERVER_PORT), 39 "--dns_resolver_bin_path", 40 "test\\cpp\\naming\\utils\\dns_resolver.py", 41 "--tcp_connect_bin_path", 42 "test\\cpp\\naming\\utils\\tcp_connect.py", 43 ] 44) 45