Debian Codegraph @

Tools/buildbot/remotePythonInfo.bat

raw
1 @echo off
2 rem Used by the buildbot "remotedeploy" step.
3 setlocal
4
5 set PATH=%PATH%;%SystemRoot%\SysNative\OpenSSH;%SystemRoot%\System32\OpenSSH
6 set here=%~dp0
7 set arm32_ssh=
8 set suffix=_d
9 if "%REMOTE_PYTHON_DIR%"=="" (set REMOTE_PYTHON_DIR=C:\python\)
10 if NOT "%REMOTE_PYTHON_DIR:~-1,1%"=="\" (set REMOTE_PYTHON_DIR=%REMOTE_PYTHON_DIR%\)
11
12 :CheckOpts
13 if "%1"=="-arm32" (set arm32_ssh=true) & (set prefix=%REMOTE_PYTHON_DIR%pcbuild\arm32) & shift & goto CheckOpts
14 if "%1"=="-d" (set suffix=_d) & shift & goto CheckOpts
15 if "%1"=="+d" (set suffix=) & shift & goto CheckOpts
16 if NOT "%1"=="" (echo unrecognized option %1) & goto Arm32SshHelp
17
18 if "%arm32_ssh%"=="true" goto :Arm32Ssh
19
20 :Arm32Ssh
21 if "%SSH_SERVER%"=="" goto :Arm32SshHelp
22
23 set PYTHON_EXE=%prefix%\python%suffix%.exe
24 echo on
25 ssh %SSH_SERVER% %PYTHON_EXE% -m test.pythoninfo
26 exit /b %ERRORLEVEL%
27
28 :Arm32SshHelp
29 echo SSH_SERVER environment variable must be set to administrator@[ip address]
30 echo where [ip address] is the address of a Windows IoT Core ARM32 device.
31 echo.
32 echo The test worker should have the SSH agent running.
33 echo Also a key must be created with ssh-keygen and added to both the buildbot worker machine
34 echo and the ARM32 worker device: see https://docs.microsoft.com/en-us/windows/iot-core/connect-your-device/ssh
35 exit /b 127