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 sys.executable, 29 'test\\cpp\\naming\\resolver_component_tests_runner.py', 30 '--test_bin_path', 'cmake\\build\\%s\\resolver_component_test.exe' % _MSBUILD_CONFIG, 31 '--dns_server_bin_path', 'test\\cpp\\naming\\utils\\dns_server.py', 32 '--records_config_path', 'test\\cpp\\naming\\resolver_test_record_groups.yaml', 33 '--dns_server_port', str(_DNS_SERVER_PORT), 34 '--dns_resolver_bin_path', 'test\\cpp\\naming\\utils\\dns_resolver.py', 35 '--tcp_connect_bin_path', 'test\\cpp\\naming\\utils\\tcp_connect.py', 36]) 37