GitLab compatibility
Hello, not sure, where to ask, so created an issue here.
So, I have such output from dune for runtest on local:

And here you can see lots of colors
But here what I see on GitLab CI from same command:

As you see, terminal in general able to show ascii colors, and I force it to have TERM=linux. However, alcotest doesn't render colors there, and didn't cleanup intermediate ... lines, just duplicate them on additional final test output.
What can be wrong here, and is it a known issue, and is there any workaround (e. g. like --no-buffer -j 1 for dune to let alcotest print colors).
Looks like it fails because test -t 1 fails (device is NOT a TTY). So is there a way to force Alcotest use colors here?
To test, try to dune runtest | less -r (almost same result).
for me, dune runtest in an alcotest repository does not output any colours. when I run dune runtest --no-buffer, I get coloured output -- you could try to add --no-buffer in your opam.
@hannesm so try dune --no-buffer runtest | less -r
Yeah, great success!
I found a workaround:
TERM=linux unbuffer dune --no-buffer runtest | less -r
(the unbuffer from the expect package)
BUT it still would be convenient to have such option in alcotest to force colors (ignore terminal check).
At least because unbuffer is half-ass solution (it broke emoji in output for example).
great success! when I manually execute a test _build/default/test/client/test_client.exe --help, there's a --color=always,auto,never command line argument -- thus alcotest already provides this, but I suspect you'll need to find a way to pass this in dune runtest
a way to pass this in
dune runtest
Exactly.
And there's still line duplication in CI, not sure, what can cause it, can't reproduce locally:
