[PATCH] ci: pytest: print labgrid console output inline
Ahmad Fatoum
a.fatoum at barebox.org
Wed Aug 6 05:46:20 PDT 2025
Makes it easier to debug issues instead of having to download the
console_main files:
- Print the console_main files inline on error
- Collect all console_main files at the end
Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
.github/workflows/test-labgrid-pytest.yml | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/.github/workflows/test-labgrid-pytest.yml b/.github/workflows/test-labgrid-pytest.yml
index 38bd7126bd86..adec3defc1d7 100644
--- a/.github/workflows/test-labgrid-pytest.yml
+++ b/.github/workflows/test-labgrid-pytest.yml
@@ -96,6 +96,7 @@ jobs:
done
- name: labgrid-pytest
+ if: steps.build.outcome == 'success'
run: |
export KBUILD_OUTPUT=build-${{matrix.arch}}-${{matrix.defconfig}}
@@ -113,17 +114,19 @@ jobs:
--junitxml=$cfg.tests.xml --lg-log=log/$cfg $extraargs
done
+ - name: Print Labgrid Console Output
+ if: always()
+ run: |
+ for i in ${{matrix.lgenv}}; do
+ grep -wq '\(QEMUDriver\|ExternalConsoleDriver\):' "$i" || continue
+
+ cfg=$(basename $i .yaml)
+ cat log/$cfg/* || true
+ done
+
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action at v2
if: steps.build.outcome == 'success'
with:
check_name: "Test Results (${{matrix.defconfig}})"
files: ./*.tests.xml
-
- - name: Publish Labgrid Log Results
- uses: actions/upload-artifact at v4
- if: steps.build.outcome == 'success'
- with:
- name: console-log-${{matrix.defconfig}}
- path: log/
- if-no-files-found: error
--
2.39.5
More information about the barebox
mailing list