#!Jinja2
[cylc]
    UTC mode = True
   [[reference test]]
       expected task failures = bad-submitter.19990101T0000Z

[scheduling]
    initial cycle point=1999
    final cycle point=1999
    [[graph]]
        P1Y="""bad-submitter:submit-failed => grepper"""
[runtime]
    [[root]]
    [[bad-submitter]]
        script = true
        [[[job]]]
            batch system = at
            batch submit command template = at non
        [[[remote]]]
            host = {{CYLC_TEST_HOST}}
    [[grepper]]
        script = """
set -x
# Test that the original command is printed
A_LOG="$(dirname "$0")/../../bad-submitter/01/job-activity.log"
grep '\[jobs-submit cmd\] cylc jobs-submit.* --host={{CYLC_TEST_HOST}}' \
    "${A_LOG}"
# Test that some STDERR is printed, with the host name as prefix
grep '({{CYLC_TEST_HOST}}) .* \[STDERR\] ' "${A_LOG}"
# Stop the suite cleanly
cylc stop "${CYLC_SUITE_NAME}"
"""
