#!Jinja2
[cylc]
    UTC mode = True
    [[reference test]]
        expected task failures = killable-1.1, killable-2.1, killable-3.1
[scheduling]
    [[graph]]
        R1="""
KILLABLE:submit-all & sleeper:start => killer
KILLABLE:submit-fail-all & sleeper => stopper
"""
[runtime]
    [[KILLABLE]]
        init-script="""
echo "CYLC_JOB_PID=$$" >>"$0.status"
sleep 60
"""
        script=true
    [[killable-1, killable-2, killable-3]]
        inherit=KILLABLE
    [[killer]]
        script="""
wait "${CYLC_TASK_MESSAGE_STARTED_PID}" 2>/dev/null || true
sleep 5
cylc kill "${CYLC_SUITE_NAME}" '*:submitted'
"""
    [[sleeper]]
        script=sleep 20
    [[stopper]]
        script=cylc stop "${CYLC_SUITE_NAME}"
