[Pkg-rust-maintainers] Bug#1078453: dh-cargo: cargo-auto-test fails to remove color codes on debci
Blair Noctis
n at sail.ng
Sat Aug 10 18:28:54 BST 2024
Package: dh-cargo
Version: 31
Severity: important
X-Debbugs-Cc: debian-rust at lists.debian.org, n at sail.ng
Dear Maintainer,
cargo-auto-test currently runs cargo with --color=always if stderr is open:
if [ -t 2 ]; then flags="--color=always"; export RUSTDOCFLAGS="--color=always"; fi
then proceeds to remove color codes from the resulting log:
sed -i -e 's/\x1b\[[0-9;]*m//g' "$rundir/run-$n.log" # rm ansi colour codes
However, this doesn't work on debci, resulting in an unreadable blob:
164s failures:
164s
164s ---- choose::override_variable stdout ----
164s Bad status: [1mDiff[0m [31m< left[0m / [32mright >[0m :
164s Some(
164s [31m< [0m[1;48;5;52;31m1[0m[31m,[0m
164s [32m> [0m[1;48;5;22;32m0[0m[32m,[0m
164s )
164s
164s Bad stdout: [1mDiff[0m [31m< left[0m / [32mright >[0m :
164s [31m<""[0m
164s [32m>"[0m[1;48;5;22;32mB\n[0m[32m"[0m
164s
164s Bad stderr: [1mDiff[0m [31m< left[0m / [32mright >[0m :
164s [31m<"e[0m[1;48;5;52;31mrror: Failed to write to
[0m[31mcho[0m[1;48;5;52;31moser[0m[31m [0m[1;48;5;52;31m`head -n1`:
[0m[31mB[0m[1;48;5;52;31mroken pipe (os error 32)[0m[31m\n"[0m
164s [32m>"echo B\n"[0m
164s
164s thread 'choose::override_variable' panicked at tests/choose.rs:61:6:
164s Output mismatch.
as seen in https://ci.debian.net/packages/r/rust-just/testing/s390x/50327769/
--
Sdrager,
Blair Noctis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/attachments/20240811/3ec41ac3/attachment.sig>
More information about the Pkg-rust-maintainers
mailing list