test/run-test: Dump CFG even if test fails
It can be useful to inspect the generated CFG when debugging test
failures (especially IR checker tests). However, the CFG is not copied
from the test directory to the requested location when the test fails,
so it must either be manually copied from the test directory (which may
be on a target device), or the failing checks must be removed from the
test temporarily in order to progress to the code that copies the CFG.
This CL rectifies this behavior, when the test is deemed to have failed
via:
* Returning a non-zero exit code.
* Producing stdout/stderr that does not match the expected output.
* The CFG checker tool finding non-matching IR.
Test: ./testrunner.py --target --dump-cfg=<path> <test> # With failures
Test: ./testrunner.py --host --dump-cfg=<path> <test> # With failures
(Testing was not performed for the ON_VM code path)
Change-Id: I589d10c5d3d80523d929a574711c303161919acb
1 file changed