mirror of
https://git.vectorsigma.ru/public/k3s.git
synced 2026-07-28 21:49:29 +00:00
Fix conformance labeling on CI, no tty (#12450)
Signed-off-by: Derek Nola <derek.nola@suse.com>
This commit is contained in:
@@ -534,15 +534,22 @@ run-go-test() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if [ "$LABEL" ]; then
|
if [ "$LABEL" ]; then
|
||||||
|
# Save original stdout and stderr
|
||||||
|
exec 3>&1
|
||||||
|
exec 4>&2
|
||||||
|
|
||||||
exec > >(awk "{ printf \"[\033[36m${LABEL}\033[m] %s\n\", \$0; fflush() }") \
|
exec > >(awk "{ printf \"[\033[36m${LABEL}\033[m] %s\n\", \$0; fflush() }") \
|
||||||
2> >(awk "{ printf \"[\033[35m${LABEL}\033[m] %s\n\", \$0; fflush() }" >&2)
|
2> >(awk "{ printf \"[\033[35m${LABEL}\033[m] %s\n\", \$0; fflush() }" >&2)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
go test -timeout=45m -v "$@" &
|
go test -timeout=45m -v "$@" &
|
||||||
|
|
||||||
# Reset LABEL
|
if [ "$LABEL" ]; then
|
||||||
unset "LABEL"
|
# Reset LABEL and restore stdout and stderr
|
||||||
exec >/dev/tty 2>/dev/tty
|
unset "LABEL"
|
||||||
|
exec 1>&3 2>&4
|
||||||
|
exec 3>&- 4>&-
|
||||||
|
fi
|
||||||
|
|
||||||
pids+=($!)
|
pids+=($!)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user