mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
ci-automation/tapfile_helper_lib.sh: only ASCII chars
This change removes all non-ASCII characters from test debug / error output when ingesting the output for inclusion in the TAP report. Jenkins TAP parser does not handle some unicode chars, leading to tap parser errors with e.g. Cilium output (which uses unicode). Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
This commit is contained in:
parent
780b0f4368
commit
81085451f4
@ -122,10 +122,12 @@ function tap_ingest_tapfile() {
|
||||
in_error_message=false
|
||||
has_error_message="true"
|
||||
else
|
||||
# remove special characters and unicode. Jenkins TAP parser don't unicode.
|
||||
echo -e "$line" \
|
||||
| sed -e 's/^Error: "--- FAIL: /"/' -e 's/^[[:space:]]*//' \
|
||||
| LC_ALL=C sed -e 's/^Error: "--- FAIL: /"/' -e 's/^[[:space:]]*//' \
|
||||
-e "s/[>\\\"']/_/g" -e 's/[[:space:]]/ /g' \
|
||||
-e 's/.\{200\}/&\n/g' \
|
||||
-e 's/[^\x00-\x7F]/?/g' \
|
||||
>> "${error_message_file}"
|
||||
continue
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user