Diag should be able to quit on error
diag should have a command line option that causes it to quit with a non-zero error code when one of the commands in a script fails.
For example, a bash script calling diag on an XML file ought to be able to tell if the test was run successfully.