tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Custom test check (post test script)

Open lukaszachy opened this issue 1 year ago • 4 comments

Use cases:

  • Run user provided script on guest when test fails (other result, always) to gather logs/configuration (e.g. sosreport) necessary to investigate the failure. Output of the script and produced artifacts has to be pulled to the host for later investigation by user.
  • Run user provided script on guest as a 'test check' which might change the test result

Such script has to have access to the 'test result', the exit code is not enough (beakerlib tests exit always with 0; previous test check might mark the test as a failure already, ...).

To some extend this can be done already by login -t -c BINARY -w fail however this doesn't store BINARY output nor can change the test result.

lukaszachy avatar Jan 12 '24 10:01 lukaszachy