You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.3 KiB

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