Reference tests were a way to write a self-testing suite in the absence of a proper test framework. Now that we have such a framework, we might as well remove all the reference test config and coding from cylc. Instead of using shutdown handlers to execute diagnosis scripts (usually to compare triggering results with that in a reference log) we should use use proper tests (e.g.cmp_triggering_ok within the framework...)
[meeting] we agreed:
reference.log files (which will still be used when this issue is dealt with).Recent notes:
suite.rc file is expected task failures.pytest, and aiming to do a lot more unit tests.Status of this Issue.
So I think this can be closed.
Re-opening due to possibly-unresolved minor questions:
cylc run? expected task failures is the blocker for that?... )From the suite.rc reference:
Reference tests are finite-duration suite runs that abort with non-zero exit status if cylc fails, if any task fails, if the suite times out, or if a shutdown event handler that (by default) compares the test run with a reference run reports failure.
Aborting if any task fails by default is probably unnecessary in a ref test run. abort if any task fails can be a generic (not test-specific) item. And expected task failures excludes a few tasks from the general abort order... which also seems reasonable to me as a general config item. We need to revisit this...
Chipping in here.
You can get rid of the CLI reference test option any time. The simplest way is to detect reference.log file. If it exists with the suite definition directory, then generate a reference log for the current run and perform a reference test on suite completion. There is no need to have a CLI option.
The expected task failure option is a separate thing. You should replace it with other more modern built-in task failure handling mechanisms.
Most helpful comment
Recent notes:
suite.rcfile isexpected task failures.We should aim to move our tests to work under[UPDATE (hjoliver) moved this point to #3505]pytest, and aiming to do a lot more unit tests.