Skip to content

Commit cd34765

Browse files
committed
networkAcess, envDef, and initialWorkDir tests
1 parent c15818a commit cd34765

File tree

56 files changed

+2220
-45
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2220
-45
lines changed

conformance_tests.yaml

Lines changed: 492 additions & 18 deletions
Large diffs are not rendered by default.

tests/dir5_noiwdr.cwl

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

tests/env-tool1_noreq.cwl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class: CommandLineTool
2+
cwlVersion: v1.3.0-dev1
3+
inputs:
4+
in: string
5+
outputs:
6+
out:
7+
type: File
8+
outputBinding:
9+
glob: out
10+
11+
envDef:
12+
TEST_ENV: $(inputs.in)
13+
14+
baseCommand: ["/bin/sh", "-c", "echo $TEST_ENV"]
15+
16+
stdout: out

tests/env-tool4_noreq.cwl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class: CommandLineTool
2+
cwlVersion: v1.3.0-dev1
3+
inputs:
4+
in: string
5+
outputs:
6+
out:
7+
type: File
8+
outputBinding:
9+
glob: out
10+
11+
envDef:
12+
TEST_ENV: conflict_original
13+
14+
baseCommand: ["/bin/bash", "-c", "echo $TEST_ENV"]
15+
16+
stdout: out

tests/env-wf1_noreq.cwl

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env cwl-runner
2+
class: Workflow
3+
cwlVersion: v1.3.0-dev1
4+
5+
inputs:
6+
in: string
7+
8+
outputs:
9+
out:
10+
type: File
11+
outputSource: step1/out
12+
13+
requirements:
14+
EnvVarRequirement:
15+
envDef:
16+
TEST_ENV: override
17+
18+
steps:
19+
step1:
20+
run: env-tool1_noreq.cwl
21+
in:
22+
in: in
23+
out: [out]

tests/initialwork-path_noiwdr.cwl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class: CommandLineTool
2+
cwlVersion: v1.3.0-dev1
3+
requirements:
4+
ShellCommandRequirement: {}
5+
initialWorkDir:
6+
- entry: $(inputs.file1)
7+
entryname: bob.txt
8+
inputs:
9+
file1: File
10+
outputs: []
11+
arguments:
12+
- shellQuote: false
13+
valueFrom: |
14+
test "$(inputs.file1.path)" = "$(runtime.outdir)/bob.txt"
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env cwl-runner
2+
3+
cwlVersion: v1.3.0-dev1
4+
5+
initialWorkDir:
6+
- $(inputs.INPUT)
7+
8+
class: CommandLineTool
9+
10+
inputs:
11+
- id: INPUT
12+
type: File
13+
14+
outputs:
15+
- id: OUTPUT
16+
type: File
17+
outputBinding:
18+
glob: $(runtime.outdir)/$(inputs.INPUT.basename)
19+
secondaryFiles:
20+
- .fai
21+
22+
arguments:
23+
- valueFrom: $(inputs.INPUT.basename).fai
24+
position: 0
25+
26+
baseCommand: [touch]
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env cwl-runner
2+
3+
cwlVersion: v1.3.0-dev1
4+
5+
requirements:
6+
- class: DockerRequirement
7+
dockerPull: docker.io/debian:stable-slim
8+
9+
initialWorkDir:
10+
- $(inputs.INPUT)
11+
12+
class: CommandLineTool
13+
14+
inputs:
15+
- id: INPUT
16+
type: File
17+
18+
outputs:
19+
- id: OUTPUT
20+
type: File
21+
outputBinding:
22+
glob: $(inputs.INPUT.basename)
23+
secondaryFiles:
24+
- .fai
25+
26+
arguments:
27+
- valueFrom: $(inputs.INPUT.basename).fai
28+
position: 0
29+
30+
baseCommand: [touch]

tests/inp_update_wf_noiwdr.cwl

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env cwl-runner
2+
class: Workflow
3+
cwlVersion: v1.3.0-dev1
4+
inputs: []
5+
outputs:
6+
a:
7+
type: int
8+
outputSource: step3/output
9+
b:
10+
type: int
11+
outputSource: step4/output
12+
steps:
13+
step1:
14+
in:
15+
in: {default: "3"}
16+
out: [out]
17+
run: echo-file-tool.cwl
18+
step2:
19+
in:
20+
r: step1/out
21+
out: [out]
22+
run: updateval_inplace_noiwdr.cwl
23+
step3:
24+
in:
25+
file1: step1/out
26+
wait: step2/out
27+
out: [output]
28+
run: parseInt-tool.cwl
29+
step4:
30+
in:
31+
file1: step2/out
32+
out: [output]
33+
run: parseInt-tool.cwl

tests/inpdir_update_wf_noiwdr.cwl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/usr/bin/env cwl-runner
2+
class: Workflow
3+
cwlVersion: v1.3.0-dev1
4+
inputs: []
5+
requirements:
6+
InlineJavascriptRequirement: {}
7+
outputs:
8+
a:
9+
type: File[]
10+
outputSource: step3/d1out
11+
b:
12+
type: File[]
13+
outputSource: step3/d2out
14+
steps:
15+
step1:
16+
in:
17+
dirname: {default: step1dir}
18+
out: [out]
19+
run: mkdir.cwl
20+
step2:
21+
in:
22+
r: step1/out
23+
out: [out]
24+
run: updatedir_inplace_noiwdr.cwl
25+
step3:
26+
in:
27+
d1: step1/out
28+
d2: step2/out
29+
out: [d1out, d2out]
30+
run:
31+
class: ExpressionTool
32+
inputs:
33+
d1:
34+
type: Directory
35+
loadListing: shallow_listing
36+
d2:
37+
type: Directory
38+
loadListing: shallow_listing
39+
outputs:
40+
d1out: File[]
41+
d2out: File[]
42+
expression: "$({d1out: inputs.d1.listing, d2out: inputs.d2.listing})"

0 commit comments

Comments
 (0)