#!Jinja2

[scheduling]
    [[graph]]
        R1 = a-task:echo => b-task

[runtime]
    [[a-task]]
        script = """
            echo rubbish
            echo garbage >&2
            cylc message 'echo done'
            sleep 60
        """
        platform = {{ environ['CYLC_TEST_PLATFORM'] }}
        [[[outputs]]]
            echo = "echo done"

    [[b-task]]
        script = """
            sleep 10  # wait for buffer to flush?
            cylc cat-log --debug -f o "${CYLC_WORKFLOW_ID}//1/a-task" | grep 'rubbish'
            cylc cat-log --debug -f e "${CYLC_WORKFLOW_ID}//1/a-task" | grep 'garbage'
        """
