44import sys
55import time
66import os
7-
7+ import platform
88
99class LocalhostTest (Builder .Action ):
1010
@@ -16,20 +16,24 @@ def start(self, env):
1616 if result .returncode != 0 :
1717 print ("Could not start a virtual environment. The localhost integration tests will fail." , file = sys .stderr )
1818 return
19-
20- python = os .path .join (venv_path , "bin" , "python" )
21-
19+
20+ # Platform-specific
21+ if platform .system () == 'Windows' :
22+ python = os .path .join (venv_path , "Scripts" , "python.exe" )
23+ else :
24+ python = os .path .join (venv_path , "bin" , "python" )
25+
2226 result = env .shell .exec (python , '-m' , 'pip' , 'install' , 'h11' , 'h2' , 'trio' )
2327 if result .returncode != 0 :
2428 print ("Could not install python HTTP dependencies. The localhost integration tests will fail." , file = sys .stderr )
2529 return
26-
30+
2731 server_dir = os .path .join (env .root_dir ,'crt' ,'aws-c-http' ,'tests' ,'mock_server' )
28-
32+
2933 p1 = subprocess .Popen ([python , "h2tls_mock_server.py" ], cwd = server_dir )
3034 p2 = subprocess .Popen ([python , "h2non_tls_server.py" ], cwd = server_dir )
3135 p3 = subprocess .Popen ([python , "h11mock_server.py" ], cwd = server_dir )
32-
36+
3337 # Wait for servers to be ready
3438 ports = [3443 , 3280 , 8082 , 8081 ]
3539 for port in ports :
0 commit comments