Closed lemeurherve closed 1 month ago
Note: this change is also included in https://github.com/jenkinsci/docker-agent/pull/827, I created this distinct pull request to check outputs while working on it.
Prefer reviewing https://github.com/jenkinsci/docker-agent/pull/827 instead of this one.
Closing in favor of https://github.com/jenkinsci/docker-agent/pull/827
This PR introduces
-TestsDebug
parameter to build.ps1.With it we can use
-TestsDebug
parameter or$env:TESTS_DEBUG
to improve Windows tests debugging:debug
: output every test command and stderr on top of every test. (Equivalent of setting$quiet=$true
in the test_helpers "Run-Program" function currently)verbose
: same asdebug
+ output of stdout.Output (from docker-ssh-agent pull request):
With `.\build.ps1 test -TestsDebug 'debug'`: With `.\build.ps1 test -TestsDebug 'verbose'`:
Similar to:
Testing done
Local tests + CI
Replay with
-TestsDebug
set to "verbose" and only one Windows image type to validate the functionality:diff
```diff --- old/Jenkinsfile +++ new/Jenkinsfile @@ -24,7 +24,7 @@ axes { axis { name 'IMAGE_TYPE' - values 'linux', 'nanoserver-1809', 'nanoserver-ltsc2019', 'nanoserver-ltsc2022', 'windowsservercore-1809', 'windowsservercore-ltsc2019', 'windowsservercore-ltsc2022' + values 'nanoserver-1809' } } stages { @@ -63,7 +63,7 @@ // If the tests are passing for Linux AMD64, then we can build all the CPU architectures sh 'docker buildx bake --file docker-bake.hcl linux' } else { - powershell '& ./build.ps1 test' + powershell '& ./build.ps1 test -TestsDebug verbose' } } } ```