Skip to content

[ci] Limit ctest output to last x lines

Lars Bilke requested to merge bilke/ogs:ci-ctest-log into master

Improves error messages for ctests with lots of runtime output (because error message is printed at the end). Avoids running into exceeding and cut off CI output.

Had a hard time implementing this but I think this final solution is nice (is done just in CI):

  • When run with -T test-parameter ctest outputs everything into an xml-file.
  • xsltproc extracts name and output of the ctest
  • tail just the last $NUM_CTEST_ERROR_LINES (1000) to the console

Shall we fail early? (ctest-parameter --stop-on-failure) Would improve CI times a bit. I would suggest to use this at least on the large benchmarks.

  1. Tests covering your feature were added?
Edited by Lars Bilke

Merge request reports