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