Verbose logging for fault injection (#2375)
* Verbose logging for fault injection Signed-off-by: Alan Jowett <alanjo@microsoft.com> * Switch upload crash dumps to 'always' Signed-off-by: Alan Jowett <alanjo@microsoft.com> --------- Signed-off-by: Alan Jowett <alanjo@microsoft.com>
This commit is contained in:
Родитель
83567d6270
Коммит
7825cd9cad
|
@ -301,7 +301,7 @@ jobs:
|
|||
|
||||
- name: Check for crash dumps
|
||||
# Check for crash dumps even if the workflow failed.
|
||||
if: (success() || failure()) && (steps.skip_check.outputs.should_skip != 'true')
|
||||
if: always() && (steps.skip_check.outputs.should_skip != 'true')
|
||||
uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b
|
||||
id: check_dumps
|
||||
with:
|
||||
|
@ -309,7 +309,7 @@ jobs:
|
|||
|
||||
- name: Upload any crash dumps
|
||||
# Upload crash dumps even if the workflow failed.
|
||||
if: (success() || failure()) && (steps.skip_check.outputs.should_skip != 'true') && (steps.check_dumps.outputs.files_exists == 'true') && (inputs.gather_dumps == true)
|
||||
if: always() && (steps.skip_check.outputs.should_skip != 'true') && (steps.check_dumps.outputs.files_exists == 'true') && (inputs.gather_dumps == true)
|
||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce
|
||||
id: upload_crash_dumps
|
||||
with:
|
||||
|
|
|
@ -17,15 +17,15 @@ $tests = & $TestProgram "--list-tests" "--verbosity=quiet"
|
|||
$env:EBPF_FAULT_INJECTION_SIMULATION = $StackDepth
|
||||
$env:EBPF_ENABLE_WER_REPORT = "yes"
|
||||
|
||||
Set-Content -Path ($TestProgram +".passed.log") ""
|
||||
Set-Content -Path ($TestProgram +".fault.log") ""
|
||||
Set-Content -Path ($TestProgram + ".passed.log") ""
|
||||
Set-Content -Path ($TestProgram + ".fault.log") ""
|
||||
|
||||
$iteration = 0
|
||||
|
||||
# Rerun failing tests until they pass
|
||||
while ($true) {
|
||||
$previous_passed_tests = $passed_tests
|
||||
$passed_tests = Get-Content -Path ($TestProgram +".passed.log")
|
||||
$passed_tests = Get-Content -Path ($TestProgram + ".passed.log")
|
||||
|
||||
# Get the list of tests that have passed in the previous iteration.
|
||||
$passed_tests | Where-Object { $_ -notin $previous_passed_tests } | ForEach-Object { Write-Host "Passed: $_" }
|
||||
|
@ -46,7 +46,7 @@ while ($true) {
|
|||
$remaining_tests | ForEach-Object { write-host "Running: $_" }
|
||||
|
||||
# Run the test binary with any remaining tests.
|
||||
$log = (& $TestProgram "-d yes" "--verbosity=quiet" "-f remaining_tests.txt" 2>&1)
|
||||
& $TestProgram "-d yes" "--verbosity=quiet" "-f remaining_tests.txt"
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
write-host "All tests passed"
|
||||
|
|
Загрузка…
Ссылка в новой задаче