# Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

- job: dir-job.yml
  output:
    "outlist": {
        "size": 20,
        "location": "output.txt",
        "class": "File",
        "checksum": "sha1$13cda8661796ae241da3a18668fb552161a72592"
    }
  tool: keep-dir-test-input.cwl
  doc: Test directory in keep

- job: dir-job2.yml
  output:
    "outlist": {
        "size": 20,
        "location": "output.txt",
        "class": "File",
        "checksum": "sha1$13cda8661796ae241da3a18668fb552161a72592"
    }
  tool: keep-dir-test-input.cwl
  doc: Test directory in keep

- job: null
  output:
    "outlist": {
        "size": 20,
        "location": "output.txt",
        "class": "File",
        "checksum": "sha1$13cda8661796ae241da3a18668fb552161a72592"
    }
  tool: keep-dir-test-input2.cwl
  doc: Test default directory in keep

- job: null
  output:
    "outlist": {
        "size": 20,
        "location": "output.txt",
        "class": "File",
        "checksum": "sha1$13cda8661796ae241da3a18668fb552161a72592"
    }
  tool: keep-dir-test-input3.cwl
  doc: Test default directory in keep

- job: octo.yml
  output: {}
  tool: cat.cwl
  doc: Test hashes in filenames

- job: listing-job.yml
  output: {
    "out": {
        "class": "File",
        "location": "output.txt",
        "size": 5,
        "checksum": "sha1$724ba28f4a9a1b472057ff99511ed393a45552e1"
    }
  }
  tool: wf/listing_shallow.cwl
  doc: test shallow directory listing

- job: listing-job.yml
  output: {
    "out": {
        "class": "File",
        "location": "output.txt",
        "size": 5,
        "checksum": "sha1$724ba28f4a9a1b472057ff99511ed393a45552e1"
    }
  }
  tool: wf/listing_none.cwl
  doc: test no directory listing

- job: listing-job.yml
  output: {
    "out": {
        "class": "File",
        "location": "output.txt",
        "size": 5,
        "checksum": "sha1$724ba28f4a9a1b472057ff99511ed393a45552e1"
    }
  }
  tool: wf/listing_deep.cwl
  doc: test deep directory listing

- job: null
  output: {}
  tool: noreuse.cwl
  doc: "Test arv:ReuseRequirement"

- job: 12213-keepref-job.yml
  output: {
    "out": [
        {
            "checksum": "sha1$1c78028c0d69163391eef89316b44a57bde3fead",
            "location": "sample1_S01_R1_001.fastq.txt",
            "class": "File",
            "size": 32
        },
        {
            "checksum": "sha1$5f3b4df1b0f7fdced751fc6079778600ad9fdb45",
            "location": "sample2_S01_R1_001.fastq.txt",
            "class": "File",
            "size": 32
        }
    ]
  }
  tool: 12213-keepref-wf.cwl
  doc: "Test manipulating keep references with expression tools"

- job: null
  output:
    out: null
  tool: 12418-glob-empty-collection.cwl
  doc: "Test glob output on empty collection"

- job: null
  output:
    "out": {
        "location": "hello.out",
        "class": "File",
        "checksum": "sha1$ec5d3976351abab45a483a49ce714a8430cb203a",
        "size": 24
    }
  tool: 13976-keepref-wf.cwl
  doc: "Test issue 13976"

- job: null
  output:
    out: out
  tool: wf/runin-wf.cwl
  doc: "RunInSingleContainer cwl.input.json needs to be consistent with pathmapper manipulations"

- job: secondary/wf-job.yml
  output: {}
  tool: secondary/wf.cwl
  doc: "RunInSingleContainer applies secondaryFile discovery & manipulation before generating cwl.input.yml"

- job: null
  output:
    out: out
  tool: wf/runin-with-ttl-wf.cwl
  doc: "RunInSingleContainer respects outputTTL"

- job: secret_test_job.yml
  output: {
    "out": {
        "class": "File",
        "location": "hashed_example.txt",
        "size": 47,
        "checksum": "sha1$f45341c7f03b4dd10646c402908d1aea0d580f5d"
    }
  }
  tool: wf/secret_wf.cwl
  doc: "Test secret input parameters"
  tags: [ secrets ]

- job: null
  output:
    out: null
  tool: wf/runin-reqs-wf.cwl
  doc: "RunInSingleContainer handles dynamic resource requests on step"

- job: null
  output:
    out: null
  tool: wf/runin-reqs-wf2.cwl
  doc: "RunInSingleContainer handles dynamic resource requests on embedded subworkflow"

- job: null
  output:
    out: null
  tool: wf/runin-reqs-wf3.cwl
  should_fail: true
  doc: "RunInSingleContainer disallows dynamic resource request on subworkflow steps"

- job: null
  output:
    out: null
  tool: wf/runin-reqs-wf4.cwl
  doc: "RunInSingleContainer discovers static resource request in subworkflow steps"

- job: null
  output:
    out: null
  tool: wf/runin-reqs-wf5.cwl
  doc: "RunInSingleContainer has minimum 128 MiB RAM"

- job: secondaryFiles/inp3.yml
  output: {}
  tool: secondaryFiles/example1.cwl
  doc: Discover secondaryFiles at runtime if they are in keep

- job: null
  output: {}
  tool: secondaryFiles/example3.cwl
  doc: Discover secondaryFiles on default values

- job: null
  output:
    out: null
  tool: wf-defaults/wf1.cwl
  doc: "Can have separate default parameters including directory and file inside same directory"

- job: null
  output:
    out: null
  tool: wf-defaults/wf2.cwl
  doc: "Can have a parameter default value that is a directory literal with a file literal"

- job: null
  output:
    out: null
  tool: wf-defaults/wf3.cwl
  doc: "Do not accept a directory literal without a basename"
  should_fail: true

- job: null
  output:
    out: null
  tool: wf-defaults/wf4.cwl
  doc: default in embedded subworkflow missing 'id' field, v1.0
  should_fail: true

- job: null
  output:
    out: null
  tool: wf-defaults/wf8.cwl
  doc: default in embedded subworkflow missing 'id' field, v1.1
  should_fail: false

- job: null
  output:
    out: null
  tool: wf-defaults/wf5.cwl
  doc: default in embedded subworkflow

- job: null
  output:
    out: null
  tool: wf-defaults/wf6.cwl
  doc: default in RunInSingleContainer step

- job: null
  output:
    out: null
  tool: wf-defaults/wf7.cwl
  doc: workflow level default in RunInSingleContainer

- job: 13931-size-job.yml
  output:
    "out": {
        "checksum": "sha1$5bf6e5357bd42a6b1d2a3a040e16a91490064d26",
        "location": "size.txt",
        "class": "File",
        "size": 3
    }
  tool: 13931-size.cwl
  doc: Test that size is set for files in Keep

- job: 15241-writable-dir-job.json
  output: {
    "results": {
        "basename": "keep:6dd5fa20622d5a7a23c9147d0927da2a+180",
        "class": "Directory",
        "listing": [
            {
                "basename": "d7514270f356df848477718d58308cc4+94",
                "class": "Directory",
                "listing": [
                    {
                        "basename": "a",
                        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
                        "class": "File",
                        "location": "a",
                        "size": 0
                    },
                    {
                        "basename": "blurg.txt",
                        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
                        "class": "File",
                        "location": "blurg.txt",
                        "size": 0
                    },
                    {
                        "basename": "c",
                        "class": "Directory",
                        "listing": [
                            {
                                "basename": "d",
                                "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
                                "class": "File",
                                "location": "d",
                                "size": 0
                            }
                        ],
                        "location": "c"
                    },
                    {
                        "basename": "b",
                        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
                        "class": "File",
                        "location": "b",
                        "size": 0
                    }
                ],
                "location": "d7514270f356df848477718d58308cc4+94"
            }
        ],
        "location": "keep:6dd5fa20622d5a7a23c9147d0927da2a+180"
    }
  }
  tool: 15241-writable-dir.cwl
  doc: Test for writable collections

- job: badkeep.yml
  output: {}
  should_fail: true
  tool: 15295-bad-keep-ref.cwl
  doc: Test checking for invalid keepref

- job: listing-job.yml
  output: {
    "out": {
        "class": "File",
        "location": "output.txt",
        "size": 5,
        "checksum": "sha1$724ba28f4a9a1b472057ff99511ed393a45552e1"
    }
  }
  tool: 16169-no-listing-hint.cwl
  doc: "Test cwltool:LoadListingRequirement propagation"

- job: hello.yml
  output:
    "out": {
        "location": "hello.out",
        "class": "File",
        "checksum": "sha1$ec5d3976351abab45a483a49ce714a8430cb203a",
        "size": 24
    }
  tool: 16377-missing-default.cwl
  doc: "Test issue 16377 - missing default fails even when it should be overridden by valid input"

- job: hello.yml
  output:
    "out":
      "checksum": "sha1$f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
      "class": "File"
      "location": "foo.txt"
      "size": 4
  tool: 17267-broken-schemas.cwl
  doc: "Test issue 17267 - inaccessible $schemas URL is not a fatal error"

- job: null
  output: {}
  tool: wf/trick_defaults2.cwl
  doc: "Test issue 17462 - secondary file objects on file defaults are not resolved"

- job: null
  output: {
    "stuff": {
        "location": "bar.txt",
        "basename": "bar.txt",
        "class": "File",
        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
        "size": 0
    }
  }
  tool: 17521-dot-slash-glob.cwl
  doc: "Test issue 17521 - bug with leading './' capturing files in subdirectories"

- job: null
  output: {
    "stuff": {
        "basename": "foo",
        "class": "Directory",
        "listing": [
            {
                "basename": "bar.txt",
                "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
                "class": "File",
                "location": "foo/bar.txt",
                "size": 0
            }
        ],
        "location": "foo"
    }
  }
  tool: 10380-trailing-slash-dir.cwl
  doc: "Test issue 10380 - bug with trailing slash when capturing an output directory"

- job: null
  output: {
    "stuff": {
        "basename": "78f3957c41d044352303a3fa326dff1e+102",
        "class": "Directory",
        "listing": [
            {
                "basename": "baz.txt",
                "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
                "class": "File",
                "location": "78f3957c41d044352303a3fa326dff1e+102/baz.txt",
                "size": 0
            },
            {
                "basename": "foo",
                "class": "Directory",
                "listing": [
                    {
                        "basename": "bar.txt",
                        "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
                        "class": "File",
                        "location": "78f3957c41d044352303a3fa326dff1e+102/foo/bar.txt",
                        "size": 0
                    }
                ],
                "location": "78f3957c41d044352303a3fa326dff1e+102/foo"
            }
        ],
        "location": "78f3957c41d044352303a3fa326dff1e+102"
    }
  }
  tool: 17801-runtime-outdir.cwl
  doc: "Test issue 17801 - bug using $(runtime.outdir) to capture the output directory"

- job: null
  output:
    "val": "keep:f225e6259bdd63bc7240599648dde9f1+97/hg19.fa"
  tool: 17858-pack-visit-crash.cwl
  doc: "Test issue 17858 - keep ref default inputs on ExpressionTool"

- job: 17879-ignore-sbg-fields-job.yml
  output:
    "outstr": "foo woble bar"
  tool: 17879-ignore-sbg-fields.cwl
  doc: "Test issue 17879 - ignores sbg fields"

- job: chipseq/chip-seq-single.json
  output: {}
  tool: chipseq/cwl-packed.json
  doc: "Test issue 18723 - correctly upload two directories with the same basename"