From eba1cdb4c2a98e9f56e027d22ad220fe66960a26 Mon Sep 17 00:00:00 2001 From: Thilo Fromm Date: Thu, 3 Mar 2022 16:29:38 +0100 Subject: [PATCH] ci-automation/tapfile_helper_lib.sh: fix CI TAP parse errors This change fixes and adds more string chars escaping in the test error debug output ("\" are removed and a bug in removing '"' is fixed), addressing a parser errof the CI encountered when ingesting TAP output. Furthermore, line numbering is shortened, and test names have a spurious "-" prefix removed. Signed-off-by: Thilo Fromm --- ci-automation/tapfile_helper_lib.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ci-automation/tapfile_helper_lib.sh b/ci-automation/tapfile_helper_lib.sh index 55589ecde5..32215bbbec 100644 --- a/ci-automation/tapfile_helper_lib.sh +++ b/ci-automation/tapfile_helper_lib.sh @@ -124,7 +124,7 @@ function tap_ingest_tapfile() { else echo -e "$line" \ | sed -e 's/^Error: "--- FAIL: /"/' -e 's/^[[:space:]]*//' \ - -e "s/[>\"']/_/g" -e 's/[[:space:]]/ /g' \ + -e "s/[>\\\"']/_/g" -e 's/[[:space:]]/ /g' \ -e 's/.\{200\}/&\n/g' \ >> "${error_message_file}" continue @@ -296,8 +296,8 @@ function tap_generate_report() { WHERE t.case_id=c.id AND c.name='${test_name}' AND t.run='${run}';" | \ - sed 's/"/ /' | \ - awk '{print " LINE " NR":" $0}' + sed 's/"/ /g' | \ + awk '{print " L" NR ": \"" $0 "\""}' done fi fi