Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Tweak Pytest logging in CI for less overwhelming logging of successful tests #7501
Our travis logs are slow to scroll through, especially when looking from a phone with Travis's bad touch integration. Especially egregious is the unit tests shard, with ~6676 lines of output to scroll through.
While we have
Use Travis's summary reports feature to only log failing and skipped tests, along with warnings. See https://docs.pytest.org/en/latest/usage.html#detailed-summary-report.
If a test fails, we still will print the stdout and stderr and the full failure, just as before.
The only thing that changes is we have less verbose output of successful tests.
We also remove reporting of the 3 slowest tests per file, as this is not relevant to the average CI use. If we want to audit slow tests, we can simply run a dedicated CI run with the option enabled.
Below comparison introduces an intentional failure in
As a result, the unit test shard went from 6676 lines down to 1795 lines, 25% the original amount. The remaining lines are because in
Results are still more verbose than I'd like. For unit tests, down from 6676 lines of unit test output to 2673. Ideally, that would only be about 200 lines for the warnings and the test summary.
Does anyone know why we output "generated xml file" after every target, like this? https://travis-ci.org/pantsbuild/pants/jobs/515924042#L673 That's where most the output is now coming from.