|
@@ -789,26 +789,19 @@ Try {
|
|
$TestRunExitCode = $LastExitCode
|
|
$TestRunExitCode = $LastExitCode
|
|
$ErrorActionPreference = "Stop"
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
|
- # Saving for artifacts......
|
|
|
|
|
|
+ # Saving where jenkins will take a look at.....
|
|
|
|
+ New-Item -Force -ItemType Directory bundles | Out-Null
|
|
$unitTestsContPath="$ContainerNameForUnitTests`:c`:\gopath\src\github.com\docker\docker\bundles"
|
|
$unitTestsContPath="$ContainerNameForUnitTests`:c`:\gopath\src\github.com\docker\docker\bundles"
|
|
$JunitExpectedContFilePath = "$unitTestsContPath\junit-report-unit-tests.xml"
|
|
$JunitExpectedContFilePath = "$unitTestsContPath\junit-report-unit-tests.xml"
|
|
- docker cp $JunitExpectedContFilePath "$TEMPORIG"
|
|
|
|
|
|
+ docker cp $JunitExpectedContFilePath "bundles"
|
|
if (-not($LastExitCode -eq 0)) {
|
|
if (-not($LastExitCode -eq 0)) {
|
|
- Throw "ERROR: Failed to docker cp the unit tests report ($JunitExpectedContFilePath) to $TEMPORIG"
|
|
|
|
|
|
+ Throw "ERROR: Failed to docker cp the unit tests report ($JunitExpectedContFilePath) to bundles"
|
|
}
|
|
}
|
|
|
|
|
|
- if (Test-Path "$TEMPORIG\junit-report-unit-tests.xml") {
|
|
|
|
- Write-Host -ForegroundColor Magenta "INFO: Unit tests results($TEMPORIG\junit-report-unit-tests.xml) exist. pwd=$pwd"
|
|
|
|
|
|
+ if (Test-Path "bundles\junit-report-unit-tests.xml") {
|
|
|
|
+ Write-Host -ForegroundColor Magenta "INFO: Unit tests results(bundles\junit-report-unit-tests.xml) exist. pwd=$pwd"
|
|
} else {
|
|
} else {
|
|
- Write-Host -ForegroundColor Magenta "ERROR: Unit tests results($TEMPORIG\junit-report-unit-tests.xml) do not exist. pwd=$pwd"
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- # Saving where jenkins will take a look at.....
|
|
|
|
- $bundlesDir = "bundles"
|
|
|
|
- New-Item -Force -ItemType Directory $bundlesDir | Out-Null
|
|
|
|
- docker cp $JunitExpectedContFilePath "$bundlesDir"
|
|
|
|
- if (-not($LastExitCode -eq 0)) {
|
|
|
|
- Throw "ERROR: Failed to docker cp the unit tests report ($JunitExpectedContFilePath) to $bundlesDir"
|
|
|
|
|
|
+ Write-Host -ForegroundColor Magenta "ERROR: Unit tests results(bundles\junit-report-unit-tests.xml) do not exist. pwd=$pwd"
|
|
}
|
|
}
|
|
|
|
|
|
if (-not($TestRunExitCode -eq 0)) {
|
|
if (-not($TestRunExitCode -eq 0)) {
|
|
@@ -855,8 +848,7 @@ Try {
|
|
#https://blogs.technet.microsoft.com/heyscriptingguy/2011/09/20/solve-problems-with-external-command-lines-in-powershell/ is useful to see tokenising
|
|
#https://blogs.technet.microsoft.com/heyscriptingguy/2011/09/20/solve-problems-with-external-command-lines-in-powershell/ is useful to see tokenising
|
|
$jsonFilePath = "..\\bundles\\go-test-report-intcli-tests.json"
|
|
$jsonFilePath = "..\\bundles\\go-test-report-intcli-tests.json"
|
|
$xmlFilePath = "..\\bundles\\junit-report-intcli-tests.xml"
|
|
$xmlFilePath = "..\\bundles\\junit-report-intcli-tests.xml"
|
|
- $c = "gotestsum --format=standard-quiet --jsonfile=$jsonFilePath --junitfile=$xmlFilePath -- "
|
|
|
|
- $c += "`"-test.v`" "
|
|
|
|
|
|
+ $c = "gotestsum --format=standard-verbose --jsonfile=$jsonFilePath --junitfile=$xmlFilePath -- "
|
|
if ($null -ne $env:INTEGRATION_TEST_NAME) { # Makes is quicker for debugging to be able to run only a subset of the integration tests
|
|
if ($null -ne $env:INTEGRATION_TEST_NAME) { # Makes is quicker for debugging to be able to run only a subset of the integration tests
|
|
$c += "`"-test.run`" "
|
|
$c += "`"-test.run`" "
|
|
$c += "`"$env:INTEGRATION_TEST_NAME`" "
|
|
$c += "`"$env:INTEGRATION_TEST_NAME`" "
|
|
@@ -886,14 +878,9 @@ Try {
|
|
|
|
|
|
$ErrorActionPreference = "SilentlyContinue"
|
|
$ErrorActionPreference = "SilentlyContinue"
|
|
Write-Host -ForegroundColor Cyan "INFO: Integration API tests being run from the host:"
|
|
Write-Host -ForegroundColor Cyan "INFO: Integration API tests being run from the host:"
|
|
- if (!($env:INTEGRATION_TESTFLAGS)) {
|
|
|
|
- $env:INTEGRATION_TESTFLAGS = "-test.v"
|
|
|
|
- }
|
|
|
|
$start=(Get-Date); Invoke-Expression ".\hack\make.ps1 -TestIntegration"; $Duration=New-Timespan -Start $start -End (Get-Date)
|
|
$start=(Get-Date); Invoke-Expression ".\hack\make.ps1 -TestIntegration"; $Duration=New-Timespan -Start $start -End (Get-Date)
|
|
$IntTestsRunResult = $LastExitCode
|
|
$IntTestsRunResult = $LastExitCode
|
|
$ErrorActionPreference = "Stop"
|
|
$ErrorActionPreference = "Stop"
|
|
- # Copy all the test results to TEMPORIG for archival
|
|
|
|
- Copy-Item -Path "$env:SOURCES_DRIVE`:\$env:SOURCES_SUBDIR\src\github.com\docker\docker\bundles\junit-report*xml" -Destination $TEMPORIG
|
|
|
|
if (-not($IntTestsRunResult -eq 0)) {
|
|
if (-not($IntTestsRunResult -eq 0)) {
|
|
Throw "ERROR: Integration API tests failed at $(Get-Date). Duration`:$Duration"
|
|
Throw "ERROR: Integration API tests failed at $(Get-Date). Duration`:$Duration"
|
|
}
|
|
}
|
|
@@ -904,7 +891,6 @@ Try {
|
|
Set-Location "$env:SOURCES_DRIVE`:\$env:SOURCES_SUBDIR\src\github.com\docker\docker\integration-cli"
|
|
Set-Location "$env:SOURCES_DRIVE`:\$env:SOURCES_SUBDIR\src\github.com\docker\docker\integration-cli"
|
|
# Explicit to not use measure-command otherwise don't get output as it goes
|
|
# Explicit to not use measure-command otherwise don't get output as it goes
|
|
$start=(Get-Date); Invoke-Expression $c; $Duration=New-Timespan -Start $start -End (Get-Date)
|
|
$start=(Get-Date); Invoke-Expression $c; $Duration=New-Timespan -Start $start -End (Get-Date)
|
|
- Copy-Item -Path $xmlFilePath -Destination $TEMPORIG
|
|
|
|
}
|
|
}
|
|
$ErrorActionPreference = "Stop"
|
|
$ErrorActionPreference = "Stop"
|
|
if (-not($LastExitCode -eq 0)) {
|
|
if (-not($LastExitCode -eq 0)) {
|
|
@@ -1052,10 +1038,10 @@ Finally {
|
|
|
|
|
|
# Save the daemon under test log
|
|
# Save the daemon under test log
|
|
if ($daemonStarted -eq 1) {
|
|
if ($daemonStarted -eq 1) {
|
|
- Write-Host -ForegroundColor Green "INFO: Saving daemon under test log ($env:TEMP\dut.out) to $TEMPORIG\CIDUT.out"
|
|
|
|
- Copy-Item "$env:TEMP\dut.out" "$TEMPORIG\CIDUT.out" -Force -ErrorAction SilentlyContinue
|
|
|
|
- Write-Host -ForegroundColor Green "INFO: Saving daemon under test log ($env:TEMP\dut.err) to $TEMPORIG\CIDUT.err"
|
|
|
|
- Copy-Item "$env:TEMP\dut.err" "$TEMPORIG\CIDUT.err" -Force -ErrorAction SilentlyContinue
|
|
|
|
|
|
+ Write-Host -ForegroundColor Green "INFO: Saving daemon under test log ($env:TEMP\dut.out) to bundles\CIDUT.out"
|
|
|
|
+ Copy-Item "$env:TEMP\dut.out" "bundles\CIDUT.out" -Force -ErrorAction SilentlyContinue
|
|
|
|
+ Write-Host -ForegroundColor Green "INFO: Saving daemon under test log ($env:TEMP\dut.err) to bundles\CIDUT.err"
|
|
|
|
+ Copy-Item "$env:TEMP\dut.err" "bundles\CIDUT.err" -Force -ErrorAction SilentlyContinue
|
|
}
|
|
}
|
|
|
|
|
|
Set-Location "$env:SOURCES_DRIVE\$env:SOURCES_SUBDIR" -ErrorAction SilentlyContinue
|
|
Set-Location "$env:SOURCES_DRIVE\$env:SOURCES_SUBDIR" -ErrorAction SilentlyContinue
|