[ci] Save undeclared test outputs #22251
Labels
component: continuous integration
Jenkins, CDash, mirroring of externals, website infrastructure
priority: medium
type: feature request
Is your feature request related to a problem? Please describe.
Sometimes, tests fail in CI but the failure is not reproducible locally. In this situation, the only diagnostic tool we have to solve the problem is the test output logged in CI. In many cases all we need is the console output (text), but in some cases we also need to inspect binary data (e.g., images, compressed logs, etc.)
At the moment, there is no way to retrieve non-text test output when Jenkins runs our tests and uploads the test results into CDash, but sometimes we need that information in order to solve the problem.
Describe the solution you'd like
In Bazel, extra test output files (beyond the normal assertion printouts) are called "undeclared outputs" as documented at https://bazel.build/reference/test-encyclopedia.
For example, after running the
internal_render_engine_vtk_test
there is a file nameddrake/bazel-testlogs/geometry/render_vtk/internal_render_engine_vtk_test/test.outputs/outputs.zip
and inside that zipfile there are images likeCloneIndependence/line_1318_Clone_independence_label.png
which have been saved by the test program.The request here is to allow a Drake Developer to download that file (
outputs.zip
) when a test fails in CI.Note that we don't need to keep these files for passing tests, only failing ones.
If it's easy, then it would also be nice for the upload to be associated in CDash so that CDash users can directly refer to it. If that's difficult, then uploading it only to Jenkins is perfectly fine.
Describe alternatives you've considered
Have the test programs print the binary files as base64-encoded text, which the developer would copy-paste and then decode.
Additional context
For reference, here is TRI's groovy code from our
Jenkinsfile
that uploads the zipfiles when CI fails. With this snippet, the user can download the zipfile from the Jenkins PR result page.The text was updated successfully, but these errors were encountered: