[scheduling]
    [[graph]]
        R1 = "startup => timeout => shutdown"
[runtime]
    [[common]]
        script = """
cylc reg $REG $DEF
echo "Sub-suite log file is: $PWD/$LOG"
if cylc run --debug --no-detach $REG > $LOG 2>&1; then 
    echo "ERROR: sub-suite did not abort as planned"
    exit 1
else
    if grep "$GREP" $LOG; then
        echo "Sub-suite aborted as planned"
    else
        echo "ERROR: sub-suite did not abort as planned"
        exit 1
    fi
fi
"""
        [[[environment]]]
            DEF = $CYLC_SUITE_DEF_PATH/hidden/${CYLC_TASK_NAME}
            REG = ${CYLC_SUITE_NAME}-${CYLC_TASK_NAME}
            LOG = ${CYLC_TASK_NAME}.log
            GREP = "ERROR - ${CYLC_TASK_NAME} EVENT HANDLER FAILED"
        [[[remote]]]
            # divorce sub-suites from the task execution environments
            # that launch them
            host = localhost
    [[startup, timeout, shutdown]]
        inherit = common
