Skip to content
Snippets Groups Projects
Unverified Commit 833fcb97 authored by Alessio Caiazza's avatar Alessio Caiazza
Browse files

Extract windows testing into a powershell script

parent 1fc69d89
No related branches found
No related tags found
No related merge requests found
...@@ -258,10 +258,8 @@ integration windows: ...@@ -258,10 +258,8 @@ integration windows:
- cmd /c mklink /D $target_path $current_path - cmd /c mklink /D $target_path $current_path
- cd $GODIR\gitlab-runner - cd $GODIR\gitlab-runner
script: script:
- $packages = (go list ./... | findstr -v "\/vendor\/" | Out-String | %{$_ -replace "\r\n"," "}) - $script = Join-Path -Path "ci" -ChildPath "test_windows.ps1"
- $testCommand = "go test $packages" - Invoke-Expression $script
- Invoke-Expression $testCommand
- if ( $LASTEXITCODE -ne 0 ) { exit $LASTEXITCODE }
allow_failure: true allow_failure: true
only: only:
- /.*/@gitlab-org/gitlab-runner - /.*/@gitlab-org/gitlab-runner
......
param([string]$testOpts = "")
$failed = @()
go list ./... | Select-String -Pattern "gitlab.com/gitlab-org/gitlab-runner/vendor/" -NotMatch | ForEach-Object {
$pkg = %{$_ -replace "\r\n", "" }
$testCmd = "go test $testOpts $pkg"
Invoke-Expression $testCmd
if ( $LASTEXITCODE -ne 0 ) { $failed += $pkg }
}
if ($failed.count -ne 0) {
Write-Host "Failed packages"
$failed | Out-String | Write-Host
exit 1
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment