Skip to content

Commit bf9ca2b

Browse files
authored
Merge pull request #33 from common-workflow-language/clarify_runtime_dirs
runtime.outdir and runtime.tmpdir must be distinct.
2 parents 00f0fcc + d54ec54 commit bf9ca2b

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

CommandLineTool.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ $graph:
7979
* Clarify behavior of `glob` to include directories.
8080
* `secondaryFiles` can now be explicitly marked as `required` or not.
8181
* Clarify CommandLineTool.arguments documentation
82+
* Clarify that runtime.outdir and runtime.tmpdir must be distinct
83+
directories.
8284
8385
See also the [CWL Workflow Description, v1.1.0-dev1 changelog](Workflow.html#Changelog).
8486
@@ -727,7 +729,8 @@ $graph:
727729
file paths in the input object to correspond to the Docker bind mounted
728730
locations. That is, the platform should rewrite values in the parameter context
729731
such as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths
730-
within the container.
732+
within the container. The platform must ensure that `runtime.outdir` and
733+
`runtime.tmpdir` are distinct directories.
731734
732735
When running a tool contained in Docker, the workflow platform must not
733736
assume anything about the contents of the Docker container, such as the

conformance_tests.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3002,7 +3002,6 @@
30023002
listing: []
30033003
tags: [ required, command_line_tool ]
30043004

3005-
30063005
- doc: Test that array of input files can be staged to directory with entryname
30073006
label: stage_file_array
30083007
tool: tests/stage_file_array.cwl
@@ -3106,3 +3105,14 @@
31063105
}
31073106
]
31083107
tags: [ required, command_line_tool ]
3108+
3109+
- job: tests/empty.json
3110+
output:
3111+
foo:
3112+
class: File
3113+
basename: foo
3114+
checksum: sha1$fa98d6085770a79e44853d575cd3ab40c0f1f4de
3115+
tool: tests/runtime-paths-distinct.cwl
3116+
label: tmpdir_is_not_outdir
3117+
doc: Test that runtime.tmpdir is not runtime.outdir
3118+
tags: [ command_line_tool ]

tests/runtime-paths-distinct.cwl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class: CommandLineTool
2+
cwlVersion: v1.1.0-dev1
3+
requirements:
4+
ShellCommandRequirement: {}
5+
inputs: {}
6+
outputs:
7+
foo: File
8+
arguments:
9+
- shellQuote: false
10+
valueFrom: |
11+
echo "cow" > "$(runtime.outdir)/foo" &&
12+
echo "moo" > "$(runtime.tmpdir)/foo" &&
13+
echo '{"foo": {"path": "$(runtime.outdir)/foo", "class": "File"} }' > cwl.output.json

0 commit comments

Comments
 (0)