From e6043996508d9417066f6d1db3ae8d6329e62535 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Fri, 5 Aug 2016 16:43:36 -0400 Subject: [PATCH] Add tests that $HOME and $TMPDIR are set correctly according to spec. --- v1.0/conformance_test_v1.0.yaml | 10 ++++++++++ v1.0/v1.0/envvar.cwl | 11 +++++++++++ v1.0/v1.0/envvar2.cwl | 14 ++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 v1.0/v1.0/envvar.cwl create mode 100644 v1.0/v1.0/envvar2.cwl diff --git a/v1.0/conformance_test_v1.0.yaml b/v1.0/conformance_test_v1.0.yaml index 730849f7e..d74da8ecb 100644 --- a/v1.0/conformance_test_v1.0.yaml +++ b/v1.0/conformance_test_v1.0.yaml @@ -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 diff --git a/v1.0/v1.0/envvar.cwl b/v1.0/v1.0/envvar.cwl new file mode 100644 index 000000000..a2b13ae0f --- /dev/null +++ b/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)] diff --git a/v1.0/v1.0/envvar2.cwl b/v1.0/v1.0/envvar2.cwl new file mode 100644 index 000000000..a89e62e23 --- /dev/null +++ b/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)]