bpo-36511: clean up python process before deploy on ARM Windows buildbots (GH-14431)

This commit is contained in:
Paul Monson 2019-09-09 14:11:17 -07:00 committed by Zachary Ware
parent 755d4ef824
commit 55d12ce8b8
1 changed files with 7 additions and 0 deletions

View File

@ -24,11 +24,18 @@ if NOT "%REMOTE_PYTHON_DIR:~-1,1%"=="\" (set REMOTE_PYTHON_DIR=%REMOTE_PYTHON_DI
echo PYTHON_SOURCE = %PYTHON_SOURCE% echo PYTHON_SOURCE = %PYTHON_SOURCE%
echo REMOTE_PYTHON_DIR = %REMOTE_PYTHON_DIR% echo REMOTE_PYTHON_DIR = %REMOTE_PYTHON_DIR%
REM stop Python processes and remove existing files if found
ssh %SSH_SERVER% "kill python.exe"
ssh %SSH_SERVER% "kill python_d.exe"
ssh %SSH_SERVER% "if EXIST %REMOTE_PYTHON_DIR% (rd %REMOTE_PYTHON_DIR% /s/q)" ssh %SSH_SERVER% "if EXIST %REMOTE_PYTHON_DIR% (rd %REMOTE_PYTHON_DIR% /s/q)"
REM Create Python directories
ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PCBuild\arm32" ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PCBuild\arm32"
ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%temp" ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%temp"
ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%Modules" ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%Modules"
ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PC" ssh %SSH_SERVER% "md %REMOTE_PYTHON_DIR%PC"
REM Copy Python files
for /f "USEBACKQ" %%i in (`dir PCbuild\*.bat /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild" for /f "USEBACKQ" %%i in (`dir PCbuild\*.bat /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild"
for /f "USEBACKQ" %%i in (`dir PCbuild\*.py /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild" for /f "USEBACKQ" %%i in (`dir PCbuild\*.py /b`) do @scp PCBuild\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild"
for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.exe /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32" for /f "USEBACKQ" %%i in (`dir PCbuild\arm32\*.exe /b`) do @scp PCBuild\arm32\%%i "%SSH_SERVER%:%REMOTE_PYTHON_DIR%PCBuild\arm32"