Skip to content

Commit 832b52b

Browse files
author
Peter Amstutz
committed
Add initial conformance tests for input and output of directory objects.
1 parent 5ad6a16 commit 832b52b

File tree

6 files changed

+104
-0
lines changed

6 files changed

+104
-0
lines changed

draft-4/conformance_test_draft-4.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,3 +647,50 @@
647647
}
648648
tool: "draft-4/conflict-wf.cwl#collision"
649649
doc: Test workflow two input files with same name.
650+
651+
- job: draft-4/dir-job.yml
652+
output:
653+
"outlist": {
654+
"size": 20,
655+
"path": "output.txt",
656+
"checksum": "sha1$13cda8661796ae241da3a18668fb552161a72592",
657+
"class": "File"
658+
}
659+
tool: draft-4/dir.cwl
660+
doc: Test directory input
661+
662+
- job: draft-4/dir-job.yml
663+
output:
664+
"outlist": {
665+
"size": 20,
666+
"path": "output.txt",
667+
"checksum": "sha1$13cda8661796ae241da3a18668fb552161a72592",
668+
"class": "File"
669+
}
670+
tool: draft-4/dir2.cwl
671+
doc: Test directory input in Docker
672+
673+
- job: draft-4/dir3-job.yml
674+
output:
675+
"outdir": {
676+
"class": "Directory",
677+
"hostfs": true,
678+
"listing": [
679+
{
680+
"basename": "hello.txt",
681+
"entry": {
682+
"class": "File",
683+
"path": "hello.txt"
684+
}
685+
},
686+
{
687+
"basename": "goodbye.txt",
688+
"entry": {
689+
"class": "File",
690+
"path": "goodbye.txt"
691+
}
692+
}
693+
],
694+
}
695+
tool: draft-4/dir3.cwl
696+
doc: Test directory input in Docker

draft-4/draft-4/dir-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
indir:
2+
class: Directory
3+
path: testdir

draft-4/draft-4/dir.cwl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class: CommandLineTool
2+
cwlVersion: draft-4.dev2
3+
requirements:
4+
- class: ShellCommandRequirement
5+
inputs:
6+
indir: Directory
7+
outputs:
8+
outlist:
9+
type: File
10+
outputBinding:
11+
glob: output.txt
12+
baseCommand: []
13+
arguments: ["cd", "$(inputs.indir.path)",
14+
{shellQuote: false, valueFrom: "&&"},
15+
"find", ".",
16+
{shellQuote: false, valueFrom: "|"},
17+
"sort"]
18+
stdout: output.txt

draft-4/draft-4/dir2.cwl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class: CommandLineTool
2+
cwlVersion: draft-4.dev2
3+
hints:
4+
DockerRequirement:
5+
dockerPull: debian:8
6+
ShellCommandRequirement: {}
7+
inputs:
8+
indir: Directory
9+
outputs:
10+
outlist:
11+
type: File
12+
outputBinding:
13+
glob: output.txt
14+
baseCommand: []
15+
arguments: ["cd", "$(inputs.indir.path)",
16+
{shellQuote: false, valueFrom: "&&"},
17+
"find", ".",
18+
{shellQuote: false, valueFrom: "|"},
19+
"sort"]
20+
stdout: output.txt

draft-4/draft-4/dir3-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
inf:
2+
class: File
3+
path: hello.tar

draft-4/draft-4/dir3.cwl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class: CommandLineTool
2+
cwlVersion: draft-4.dev2
3+
baseCommand: [tar, xvf]
4+
inputs:
5+
inf:
6+
type: File
7+
inputBinding:
8+
position: 1
9+
outputs:
10+
outdir:
11+
type: Directory
12+
outputBinding:
13+
glob: .

0 commit comments

Comments
 (0)