[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: Diff < left / right > :
164s  Some(
164s <    1,
164s >    0,
164s  )
164s
164s Bad stdout: Diff < left / right > :
164s <""
164s >"B\n"
164s
164s Bad stderr: Diff < left / right > :
164s <"error: Failed to write to
chooser `head -n1`:
Broken pipe (os error 32)\n"
164s >"echo B\n"
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