#!Jinja2

{% set OWNER = environ['CYLC_TEST_OWNER'] %}

[meta]
    title = "Test external task host selection"

    description = """
Task host is determined by a script in the suite bin directory; for this
test suite it just returns the value of $CYLC_TEST_HOST as used
by many of the other test suites (see "cylc test-battery --help")."""

[scheduling]
    [[graph]]
        R1 = "foo1 & foo2 & foo3 & bar"
[runtime]
    [[root]]
        script = "true" # fast
    [[foo1, foo2, foo3]]
        [[[remote]]]
            # in suite bin directory:
            host = $(host-select.sh) # returns value of $CYLC_TEST_HOST
            owner = {{ OWNER }}
    [[bar]]
        [[[remote]]]
            host = $CYLC_TEST_HOST
            owner = {{ OWNER }}
