Skip to content

Commit

Permalink
Add tests that $HOME and $TMPDIR are set correctly according to spec.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Amstutz committed Aug 5, 2016
1 parent a479bbd commit e604399
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions v1.0/conformance_test_v1.0.yaml
Expand Up @@ -844,3 +844,13 @@
size: 2
tool: v1.0/nested-array.cwl
doc: Test command line generation of array-of-arrays

- job: v1.0/empty.json
output: {}
tool: v1.0/envvar.cwl
doc: Test $HOME and $TMPDIR are set correctly

- job: v1.0/empty.json
output: {}
tool: v1.0/envvar2.cwl
doc: Test $HOME and $TMPDIR are set correctly in Docker
11 changes: 11 additions & 0 deletions v1.0/v1.0/envvar.cwl
@@ -0,0 +1,11 @@
class: CommandLineTool
cwlVersion: v1.0
inputs: []
outputs: []
requirements:
ShellCommandRequirement: {}
arguments: [
echo, {valueFrom: '"HOME=$HOME"', shellQuote: false}, {valueFrom: '"TMPDIR=$TMPDIR"', shellQuote: false},
{valueFrom: '&&', shellQuote: false},
test, {valueFrom: '"$HOME"', shellQuote: false}, "=", $(runtime.outdir),
"-a", {valueFrom: '"$TMPDIR"', shellQuote: false}, "=", $(runtime.tmpdir)]
14 changes: 14 additions & 0 deletions v1.0/v1.0/envvar2.cwl
@@ -0,0 +1,14 @@
class: CommandLineTool
cwlVersion: v1.0
inputs: []
outputs: []
requirements:
ShellCommandRequirement: {}
hints:
DockerRequirement:
dockerPull: debian:8
arguments: [
echo, {valueFrom: '"HOME=$HOME"', shellQuote: false}, {valueFrom: '"TMPDIR=$TMPDIR"', shellQuote: false},
{valueFrom: '&&', shellQuote: false},
test, {valueFrom: '"$HOME"', shellQuote: false}, "=", $(runtime.outdir),
"-a", {valueFrom: '"$TMPDIR"', shellQuote: false}, "=", $(runtime.tmpdir)]

0 comments on commit e604399

Please sign in to comment.