ginkgo icon indicating copy to clipboard operation
ginkgo copied to clipboard

Make it possible to flush output via newline in between tests

Open onsi opened this issue 1 year ago • 2 comments

Some CI systems only flush output when a newline is observed. This makes it hard to see Ginkgo's progress when running without -v. A new mode that forces Ginkgo to emit a newline between each spec report (even if that report is just "o") would resolve this.

/cc @pohly

onsi avatar Feb 02 '24 21:02 onsi

This is the gist of it. Note that we haven't actually verified that a newline will help, but it seems likely.

While you are at it, a mode where not even the o or S gets printed might also be useful. When I run -focus=one-particular-test, the screen fills up with S characters simply because we have so many tests in the Kubernetes E2E suite.

pohly avatar Feb 03 '24 12:02 pohly

Or make it so that just the S gets skipped (pun intended). The o is useful when running a few tests.

pohly avatar Feb 04 '24 09:02 pohly

sigh - it only took 3 months but --silence-skips and --force-newlines are both now available on master. i'll be cutting a release shortly. please give it a try when you have time and lemme know if it helps.

onsi avatar May 21 '24 17:05 onsi

2.18.0 is out and includes this

onsi avatar May 21 '24 17:05 onsi

woops - didn't mean to close it!

onsi avatar May 21 '24 17:05 onsi

This works as expected and does indeed help with watching progress in Prow. Thanks!

I think this can be closed.

pohly avatar May 22 '24 09:05 pohly

wonderful, glad to hear it!

onsi avatar May 22 '24 15:05 onsi