Skip to content

Commit 9838092

Browse files
tom-tanGlassOfWhiskey
authored andcommitted
Merge pull request #176 from tom-tan/add-record-order-test
Add conformance test for sorting record fields (inputBinding for all levels)
1 parent 26690a9 commit 9838092

File tree

3 files changed

+74
-2
lines changed

3 files changed

+74
-2
lines changed

conformance_tests.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3541,6 +3541,14 @@
35413541
Use of $(runtime.outdir) for outputBinding glob.
35423542
tags: [ required, command_line_tool ]
35433543

3544+
- tool: tests/record-order.cwl
3545+
job: tests/record-order-job.json
3546+
output:
3547+
args: [-a, -b, '1', -c, '3', -d, -e, '2', -f, '4']
3548+
label: record-order-with-input-bindings
3549+
doc: Test sorting arguments at each level (inputBinding for all levels)
3550+
tags: [ command_line, required ]
3551+
35443552
- label: output_reference_workflow_input
35453553
output: {
35463554
"last": "me"
@@ -3571,5 +3579,4 @@
35713579
doc: >-
35723580
Test SchemaDefRequirement with a workflow, with the `$import` under types.
35733581
It is similar to schemadef-wf, but the `$import` is different.
3574-
tags: [ workflow, schema_def ]
3575-
3582+
tags: [ workflow, schema_def ]

tests/record-order-job.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"a": {
3+
"b": 1,
4+
"c": 3
5+
},
6+
"d": {
7+
"e": 2,
8+
"f": 4
9+
}
10+
}

tests/record-order.cwl

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
class: CommandLineTool
2+
cwlVersion: v1.2
3+
4+
baseCommand: python
5+
inputs:
6+
- id: args.py
7+
type: File
8+
default:
9+
class: File
10+
location: args.py
11+
inputBinding:
12+
position: -1
13+
- id: a
14+
type:
15+
type: record
16+
fields:
17+
- name: b
18+
type: int
19+
inputBinding:
20+
position: 1
21+
prefix: -b
22+
- name: c
23+
type: int
24+
inputBinding:
25+
position: 3
26+
prefix: -c
27+
inputBinding:
28+
position: 5
29+
prefix: -a
30+
- id: d
31+
type:
32+
type: record
33+
fields:
34+
- name: e
35+
type: int
36+
inputBinding:
37+
position: 2
38+
prefix: -e
39+
- name: f
40+
type: int
41+
inputBinding:
42+
position: 4
43+
prefix: -f
44+
inputBinding:
45+
position: 6
46+
prefix: -d
47+
outputs:
48+
- id: args
49+
type:
50+
type: array
51+
items: string
52+
53+
hints:
54+
- class: DockerRequirement
55+
dockerPull: docker.io/python:3-slim

0 commit comments

Comments
 (0)