# Test workflow with a very deep dependency chain (15 steps)
# Tests: parser handling of many sequential jobs, long DAG

rule all:
    input: "output/step_15.txt"

rule step_1:
    output: "output/step_1.txt"
    shell: "echo '1' > {output}"

rule step_2:
    input: "output/step_1.txt"
    output: "output/step_2.txt"
    shell: "cat {input} > {output} && echo '2' >> {output}"

rule step_3:
    input: "output/step_2.txt"
    output: "output/step_3.txt"
    shell: "cat {input} > {output} && echo '3' >> {output}"

rule step_4:
    input: "output/step_3.txt"
    output: "output/step_4.txt"
    shell: "cat {input} > {output} && echo '4' >> {output}"

rule step_5:
    input: "output/step_4.txt"
    output: "output/step_5.txt"
    shell: "cat {input} > {output} && echo '5' >> {output}"

rule step_6:
    input: "output/step_5.txt"
    output: "output/step_6.txt"
    shell: "cat {input} > {output} && echo '6' >> {output}"

rule step_7:
    input: "output/step_6.txt"
    output: "output/step_7.txt"
    shell: "cat {input} > {output} && echo '7' >> {output}"

rule step_8:
    input: "output/step_7.txt"
    output: "output/step_8.txt"
    shell: "cat {input} > {output} && echo '8' >> {output}"

rule step_9:
    input: "output/step_8.txt"
    output: "output/step_9.txt"
    shell: "cat {input} > {output} && echo '9' >> {output}"

rule step_10:
    input: "output/step_9.txt"
    output: "output/step_10.txt"
    shell: "cat {input} > {output} && echo '10' >> {output}"

rule step_11:
    input: "output/step_10.txt"
    output: "output/step_11.txt"
    shell: "cat {input} > {output} && echo '11' >> {output}"

rule step_12:
    input: "output/step_11.txt"
    output: "output/step_12.txt"
    shell: "cat {input} > {output} && echo '12' >> {output}"

rule step_13:
    input: "output/step_12.txt"
    output: "output/step_13.txt"
    shell: "cat {input} > {output} && echo '13' >> {output}"

rule step_14:
    input: "output/step_13.txt"
    output: "output/step_14.txt"
    shell: "cat {input} > {output} && echo '14' >> {output}"

rule step_15:
    input: "output/step_14.txt"
    output: "output/step_15.txt"
    shell: "cat {input} > {output} && echo '15' >> {output}"
