manual_run_resolver_component_test.py 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. import os
  16. import subprocess
  17. import sys
  18. # The c-ares test suite doesn't get ran regularly on Windows, but
  19. # this script provides a way to run a lot of the tests manually.
  20. _MSBUILD_CONFIG = os.environ['CONFIG']
  21. os.chdir(os.path.join('..', '..', os.getcwd()))
  22. # This port is arbitrary, but it needs to be available.
  23. _DNS_SERVER_PORT = 15353
  24. subprocess.call([
  25. sys.executable,
  26. 'test\\cpp\\naming\\resolver_component_tests_runner.py',
  27. '--test_bin_path',
  28. 'cmake\\build\\%s\\resolver_component_test.exe' % _MSBUILD_CONFIG,
  29. '--dns_server_bin_path',
  30. 'test\\cpp\\naming\\utils\\dns_server.py',
  31. '--records_config_path',
  32. 'test\\cpp\\naming\\resolver_test_record_groups.yaml',
  33. '--dns_server_port',
  34. str(_DNS_SERVER_PORT),
  35. '--dns_resolver_bin_path',
  36. 'test\\cpp\\naming\\utils\\dns_resolver.py',
  37. '--tcp_connect_bin_path',
  38. 'test\\cpp\\naming\\utils\\tcp_connect.py',
  39. ])