[meta]
purpose = """
        Test that subshells are handled for platform and host configs.
        Tasks of the form .*no_subshell act as control runs.
"""

[scheduler]
    UTC mode = True
    [[events]]
        abort on stall timeout = True
        stall timeout = PT0S

[scheduling]
    [[dependencies]]
        R1 = """
            host_no_subshell
            localhost_subshell
            platform_subshell:submit-fail?
            platform_no_subshell:submit-fail?
            platform_subshell_empty:submit-fail?
            platform_subshell_suffix:submit-fail?
            host_subshell:submit-fail?
            host_subshell_backticks:submit-fail?
        """

[runtime]
    [[root]]
        script = true

    [[platform_no_subshell]]
        platform = improbable platform name

    [[host_no_subshell]]
        [[[remote]]]
            host = localhost

    [[platform_subshell]]
        platform = $(echo "improbable platform name")

    [[platform_subshell_empty]]
        platform = $(echo "")

    [[platform_subshell_suffix]]
        platform = prefix-$( echo middle )-suffix

    [[host_subshell]]
        [[[remote]]]
            host = $(echo "improbable host name")

    [[host_subshell_backticks]]
        [[[remote]]]
            host = `echo "improbable host name"`

    [[localhost_subshell]]
        [[[remote]]]
            host = $(echo "localhost4.localdomain4")
