From ab2000e3e46e47a3b12a520e495cbeb43ea1b9fd Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Tue, 28 Mar 2023 21:09:11 +0200 Subject: [PATCH] run-kola-tests.yaml: fix test-summary TAP formatting Signed-off-by: Thilo Fromm --- .github/workflows/run-kola-tests.yaml | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run-kola-tests.yaml b/.github/workflows/run-kola-tests.yaml index e734af184a..82fe53dc34 100644 --- a/.github/workflows/run-kola-tests.yaml +++ b/.github/workflows/run-kola-tests.yaml @@ -254,8 +254,26 @@ jobs: scripts/__TESTS__/*/_kola_temp/ scripts/results-*.tap + - name: Patch TAP reports so test-summary can parse + if: always() + shell: bash + run: | + exec 2>&1 + set -x + set -euo pipefail + + cd scripts + for tap in results-*.tap; do + sumtap="test-summary-${tap}" + # If this is missing then test-summary assumes the TAP report + # is, in fact, XML. + # See https://github.com/flatcar/scripts/pull/696#discussion_r1151027499 + echo "TAP version 13" > "${sumtap}" + cat "${tap}" >> "${sumtap}" + done + - name: Create Test Summary if: always() uses: test-summary/action@v2 with: - paths: "scripts/results-*.tap" + paths: "scripts/test-summary-results-*.tap"