Skip to content

Commit 0423299

Browse files
authored
Merge pull request #46 from common-workflow-language/loadListing-tests
Add conformance tests for loadListing/LoadListingRequirement
2 parents 54af5a1 + e9b06f9 commit 0423299

10 files changed

+181
-7
lines changed

conformance_tests.yaml

Lines changed: 75 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,8 +2349,8 @@
23492349
tags: [ command_line_tool, required ]
23502350

23512351
- job: tests/empty.json
2352-
output:
2353-
wc_output:
2352+
output:
2353+
wc_output:
23542354
class: File
23552355
checksum: sha1$3596ea087bfdaf52380eae441077572ed289d657
23562356
size: 3
@@ -2362,7 +2362,7 @@
23622362

23632363
- job: tests/cat-job.json
23642364
output:
2365-
wc_output:
2365+
wc_output:
23662366
class: File
23672367
checksum: sha1$e5fa44f2b31c1fb553b6021e7360d07d5d91ff5e
23682368
size: 2
@@ -2373,8 +2373,8 @@
23732373
tags: [ workflow, required ]
23742374

23752375
- job: tests/wc-job.json
2376-
output:
2377-
wc_output:
2376+
output:
2377+
wc_output:
23782378
class: File
23792379
checksum: sha1$3596ea087bfdaf52380eae441077572ed289d657
23802380
size: 3
@@ -2385,8 +2385,8 @@
23852385
tags: [ workflow, subworkflow ]
23862386

23872387
- job: tests/sum-job.json
2388-
output:
2389-
result:
2388+
output:
2389+
result:
23902390
class: File
23912391
checksum: sha1$ad552e6dc057d1d825bf49df79d6b98eba846ebe
23922392
size: 3
@@ -3116,3 +3116,71 @@
31163116
label: tmpdir_is_not_outdir
31173117
doc: Test that runtime.tmpdir is not runtime.outdir
31183118
tags: [ command_line_tool ]
3119+
3120+
- job: tests/listing-job.yml
3121+
tool: tests/listing_none1.cwl
3122+
label: listing_default_none
3123+
output:
3124+
out: true
3125+
doc: Test that default behavior is 'no_listing' if not specified
3126+
tags: [ command_line_tool ]
3127+
3128+
- job: tests/listing-job.yml
3129+
tool: tests/listing_none2.cwl
3130+
label: listing_requirement_none
3131+
output:
3132+
out: true
3133+
doc: Test that 'listing' is not present when LoadListingRequirement is 'no_listing'
3134+
tags: [ command_line_tool ]
3135+
3136+
- job: tests/listing-job.yml
3137+
tool: tests/listing_none3.cwl
3138+
label: listing_loadListing_none
3139+
output:
3140+
out: true
3141+
doc: Test that 'listing' is not present when loadListing on input parameter is 'no_listing'
3142+
tags: [ command_line_tool ]
3143+
3144+
- job: tests/listing-job.yml
3145+
tool: tests/listing_shallow1.cwl
3146+
label: listing_requirement_shallow
3147+
output:
3148+
out: true
3149+
doc: |
3150+
Test that 'listing' is present in top directory object but not
3151+
subdirectory object when LoadListingRequirement is
3152+
'shallow_listing'
3153+
tags: [ command_line_tool ]
3154+
3155+
- job: tests/listing-job.yml
3156+
tool: tests/listing_shallow2.cwl
3157+
label: listing_loadListing_shallow
3158+
output:
3159+
out: true
3160+
doc: |
3161+
Test that 'listing' is present in top directory object but not
3162+
subdirectory object when loadListing on input parameter loadListing is
3163+
'shallow_listing'
3164+
tags: [ command_line_tool ]
3165+
3166+
- job: tests/listing-job.yml
3167+
tool: tests/listing_deep1.cwl
3168+
label: listing_requirement_deep
3169+
output:
3170+
out: true
3171+
doc: |
3172+
Test that 'listing' is present in top directory object and in
3173+
subdirectory objects when LoadListingRequirement is
3174+
'deep_listing'
3175+
tags: [ command_line_tool ]
3176+
3177+
- job: tests/listing-job.yml
3178+
tool: tests/listing_deep2.cwl
3179+
label: listing_loadListing_deep
3180+
output:
3181+
out: true
3182+
doc: |
3183+
Test that 'listing' is present in top directory object and in
3184+
subdirectory objects when input parameter loadListing is
3185+
'deep_listing'
3186+
tags: [ command_line_tool ]

tests/listing-job.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
d:
2+
class: Directory
3+
location: tmp1

tests/listing_deep1.cwl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.1.0-dev1
4+
requirements:
5+
LoadListingRequirement:
6+
loadListing: deep_listing
7+
InlineJavascriptRequirement: {}
8+
inputs:
9+
d: Directory
10+
outputs:
11+
out:
12+
type: boolean
13+
outputBinding:
14+
outputEval: '$(inputs.d.listing.length === 1 && inputs.d.listing[0].listing.length === 1)'
15+
baseCommand: "true"

tests/listing_deep2.cwl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.1.0-dev1
4+
requirements:
5+
InlineJavascriptRequirement: {}
6+
inputs:
7+
d:
8+
type: Directory
9+
loadListing: deep_listing
10+
outputs:
11+
out:
12+
type: boolean
13+
outputBinding:
14+
outputEval: '$(inputs.d.listing.length === 1 && inputs.d.listing[0].listing.length === 1)'
15+
baseCommand: "true"

tests/listing_none1.cwl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.1.0-dev1
4+
requirements:
5+
InlineJavascriptRequirement: {}
6+
inputs:
7+
d: Directory
8+
outputs:
9+
out:
10+
type: boolean
11+
outputBinding:
12+
outputEval: $(inputs.d.listing === undefined)
13+
baseCommand: "true"

tests/listing_none2.cwl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.1.0-dev1
4+
requirements:
5+
LoadListingRequirement:
6+
loadListing: no_listing
7+
InlineJavascriptRequirement: {}
8+
inputs:
9+
d: Directory
10+
outputs:
11+
out:
12+
type: boolean
13+
outputBinding:
14+
outputEval: $(inputs.d.listing === undefined)
15+
baseCommand: "true"

tests/listing_none3.cwl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.1.0-dev1
4+
requirements:
5+
InlineJavascriptRequirement: {}
6+
inputs:
7+
d:
8+
type: Directory
9+
loadListing: no_listing
10+
outputs:
11+
out:
12+
type: boolean
13+
outputBinding:
14+
outputEval: $(inputs.d.listing === undefined)
15+
baseCommand: "true"

tests/listing_shallow1.cwl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.1.0-dev1
4+
requirements:
5+
LoadListingRequirement:
6+
loadListing: shallow_listing
7+
InlineJavascriptRequirement: {}
8+
inputs:
9+
d: Directory
10+
outputs:
11+
out:
12+
type: boolean
13+
outputBinding:
14+
outputEval: '$(inputs.d.listing.length === 1 && inputs.d.listing[0].listing === undefined)'
15+
baseCommand: "true"

tests/listing_shallow2.cwl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env cwl-runner
2+
class: CommandLineTool
3+
cwlVersion: v1.1.0-dev1
4+
requirements:
5+
InlineJavascriptRequirement: {}
6+
inputs:
7+
d:
8+
type: Directory
9+
loadListing: shallow_listing
10+
outputs:
11+
out:
12+
type: boolean
13+
outputBinding:
14+
outputEval: '$(inputs.d.listing.length === 1 && inputs.d.listing[0].listing === undefined)'
15+
baseCommand: "true"

tests/tmp1/tmp2/tmp3/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)