Updated Run OpenSSH Pester Tests (markdown)

Yanbing 2017-06-16 16:16:59 -07:00
parent 050f016fa5
commit cd3e518ab5

@ -1,21 +1,14 @@
## Build OpenSSH: (skip these steps if youve already done)
```powershell
Import-Module .\openssh-portable\contrib\win32\openssh\appveyor.psm1 Force
Start-SSHBuild -Configuration Debug -NativeHostArch x64 Verbose
Import-Module C:\git\openssh-portable\contrib\win32\openssh\OpenSSHBuildHelper.psm1 -Force
Build-OpenSSH -Configuration Debug -NativeHostArch x64
Install-OpenSSH -OpenSSHDir $env:SystemDrive\OpenSSH -Configuration Debug -NativeHostArch x64
```
## Run OpenSSH Pester Tests:
- Deploy OpenSSH tests
```powershell
Import-Module .\openssh-portable\contrib\win32\openssh\appveyor.psm1 Force
Install-TestDependencies
Deploy-OpenSSHTests -OpenSSHTestDir $env:SystemDrive\OpenSSH -Configuration Debug -NativeHostArch x64
```
- Run pester tests : Launch powershell core windows (for example at **"$env:ProgramFiles\PowerShell\6.0.0.12\powershell.exe"**) and run the below command:
```powershell
cd $env:SystemDrive\OpenSSH
Import-Module .\openssh-portable\contrib\win32\openssh\appveyor.psm1 Force
Run-OpenSSHPesterTest testRoot $env:SystemDrive\OpenSSH -outputXml testresult.xml
Import-Module C:\git\openssh-portable\contrib\win32\openssh\OpenSSHTestHelper.psm1 -Force
Setup-OpenSSHTestEnvironment -Quiet -OpenSSHBinPath Setup-OpenSSHTestEnvironment -Quiet -OpenSSHBinPath
Run-OpenSSHE2ETest
```
Note: If you want to run a particular test, just launch it by the script name:
```powershell