-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Add VSTS CI for Windows #7536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add VSTS CI for Windows #7536
Changes from all commits
ae6e818
5ae760d
e206f43
c42c0ae
927929a
412887c
760003d
8071243
1a3e46e
ffb2df3
21f5859
258e737
8046c5e
5368f49
18b15d1
4f26bad
9419c19
45c8fb2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr) | ||
| queue: | ||
| name: Hosted VS2017 | ||
| parallel: 2 # Limit to two agents at a time | ||
| matrix: | ||
| UnelevatedPesterTests: | ||
| Purpose: UnelevatedPesterTests | ||
| ElevatedPesterTests_xUnit_Packaging: | ||
| Purpose: ElevatedPesterTests_xUnit_Packaging | ||
|
|
||
| variables: | ||
| GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'" | ||
| DOTNET_CLI_TELEMETRY_OPTOUT: 1 | ||
| POWERSHELL_TELEMETRY_OPTOUT: 1 | ||
| # Avoid expensive initialization of dotnet cli, see: http://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds | ||
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 | ||
|
|
||
| resources: | ||
| - repo: self | ||
| clean: true | ||
|
|
||
| steps: | ||
| - powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhss"))" | ||
| displayName: Set Build Name for Non-PR | ||
| condition: ne(variables['Build.Reason'], 'PullRequest') | ||
|
|
||
| - powershell: | | ||
| git submodule update --init | ||
| displayName: SubModule Init | ||
| condition: succeededOrFailed() | ||
|
|
||
| - powershell: | | ||
| [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Re-evaluate if this is needed |
||
| Import-Module .\tools\Appveyor.psm1 | ||
| Invoke-AppveyorInstall | ||
| displayName: Bootstrap | ||
| condition: succeededOrFailed() | ||
|
|
||
| - powershell: | | ||
| Import-Module .\tools\Appveyor.psm1 | ||
| Invoke-AppveyorBuild | ||
| Save-PSOptions | ||
| displayName: Build | ||
| condition: succeeded() | ||
|
|
||
| - powershell: | | ||
| Import-Module .\tools\Appveyor.psm1 | ||
| Restore-PSOptions | ||
| Invoke-AppveyorTest -Purpose '$(Purpose)' | ||
| displayName: Test | ||
| condition: succeeded() | ||
|
|
||
| - powershell: | | ||
| Import-Module .\tools\Appveyor.psm1 | ||
| Restore-PSOptions | ||
| Invoke-AppveyorAfterTest | ||
| displayName: AfterTest | ||
| condition: succeededOrFailed() | ||
|
|
||
| - powershell: | | ||
| Import-Module .\tools\Appveyor.psm1 | ||
| Restore-PSOptions | ||
| Invoke-AppveyorFinish | ||
| displayName: Finish | ||
| condition: eq(variables['Purpose'], 'ElevatedPesterTests_xUnit_Packaging') | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -161,7 +161,8 @@ Describe "Get-ChildItem" -Tags "CI" { | |
| (Get-ChildItem -Path $searchRoot -Directory -Recurse).Count | Should -Be 1 | ||
| } | ||
|
|
||
| It "Should give .sys file if the fullpath is specified with hidden and force parameter" -Skip:(!$IsWindows) { | ||
| # VSTS machines don't have a page file | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. at all or on system drive?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They don't have a page file on the system drive
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could find the page file location: #Open the registry on multiple remote computers
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$server )
$RegKeyPath= "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"
$pageFileKey=$reg.OpenSubKey($RegKeyPath)
$pageFileLocation=$pageFileKey.GetValue("ExistingPageFiles")
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've updated #7554 |
||
| It "Should give .sys file if the fullpath is specified with hidden and force parameter" -Pending { | ||
| # Don't remove!!! It is special test for hidden and opened file with exclusive lock. | ||
| $file = Get-ChildItem -path "$env:SystemDrive\\pagefile.sys" -Hidden | ||
| $file | Should not be $null | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,7 +79,7 @@ Describe "Test-Connection" -tags "CI" { | |
| } | ||
|
|
||
| # In VSTS, address is 0.0.0.0 | ||
| It "Force IPv4 with implicit PingOptions" -Skip:(Test-IsVstsLinux) { | ||
| It "Force IPv4 with implicit PingOptions" -Skip:((Test-IsVstsLinux) -or (Test-IsVstsWindows)) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder how we'll do remoting tests if VSTS, address is 0.0.0.0? What about web cmdlet tests? Seems we need add [Feature] to a commit title.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remoting tests are working
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At this point, only CI has been ported, not Feature tests. We should have a later pull request to enable daily builds and [Feature] etc |
||
| $result = Test-Connection $realName -Count 1 -IPv4 | ||
|
|
||
| $result.Replies[0].Address | Should -BeExactly $realAddress | ||
|
|
@@ -90,7 +90,7 @@ Describe "Test-Connection" -tags "CI" { | |
| } | ||
|
|
||
| # In VSTS, address is 0.0.0.0 | ||
| It "Force IPv4 with explicit PingOptions" -Skip:(Test-IsVstsLinux) { | ||
| It "Force IPv4 with explicit PingOptions" -Skip:((Test-IsVstsLinux) -or (Test-IsVstsWindows)) { | ||
| $result1 = Test-Connection $realName -Count 1 -IPv4 -MaxHops 10 -DontFragment | ||
|
|
||
| $result2 = Test-Connection $realName -Count 1 -IPv4 -MaxHops 1 -DontFragment | ||
|
|
@@ -196,8 +196,9 @@ Describe "Test-Connection" -tags "CI" { | |
| } | ||
|
|
||
| # TODO: We skip the MTUSizeDetect tests on Unix because we expect 'TtlExpired' but get 'TimeOut' internally from .Net Core | ||
| # Skipping on VSTS in Windows due to `TimedOut` | ||
| Context "MTUSizeDetect" { | ||
| It "MTUSizeDetect works" -Pending:(!$isWindows) { | ||
| It "MTUSizeDetect works" -Pending:(!$isWindows -or (Test-IsVstsWindows)) { | ||
| $result = Test-Connection $realName -MTUSizeDetect | ||
|
|
||
| $result | Should -BeOfType "System.Net.NetworkInformation.PingReply" | ||
|
|
@@ -206,7 +207,7 @@ Describe "Test-Connection" -tags "CI" { | |
| $result.MTUSize | Should -BeGreaterThan 0 | ||
| } | ||
|
|
||
| It "Quiet works" -Pending:(!$isWindows) { | ||
| It "Quiet works" -Pending:(!$isWindows -or (Test-IsVstsWindows)) { | ||
| $result = Test-Connection $realName -MTUSizeDetect -Quiet | ||
|
|
||
| $result | Should -BeOfType "Int32" | ||
|
|
@@ -216,7 +217,7 @@ Describe "Test-Connection" -tags "CI" { | |
|
|
||
| Context "TraceRoute" { | ||
| # Hangs in VSTS Linux | ||
| It "TraceRoute works" -skip:(Test-IsVstsLinux) { | ||
| It "TraceRoute works" -skip:((Test-IsVstsLinux) -or (Test-IsVstsWindows)) { | ||
| $result = Test-Connection $realName -TraceRoute | ||
| $replies = $result.Replies | ||
| # Check target host reply. | ||
|
|
@@ -243,7 +244,7 @@ Describe "Test-Connection" -tags "CI" { | |
| } | ||
|
|
||
| # Hangs in VSTS Linux | ||
| It "Quiet works" -skip:(Test-IsVstsLinux) { | ||
| It "Quiet works" -skip:((Test-IsVstsLinux) -or (Test-IsVstsWindows)) { | ||
| $result = Test-Connection $realName -TraceRoute -Quiet | ||
|
|
||
| $result | Should -BeTrue | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are these two?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just forcing the line endings to be LF which is what we expect