From 75c59146721b93478fc17ae0f2f5e5487e315b3b Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Mon, 28 May 2018 01:42:04 -0700 Subject: [PATCH 1/2] Multi item baseCommand quoting test --- v1.0/conformance_test_v1.0.yaml | 11 +++++++++++ v1.0/v1.0/awk-awk-input | 2 ++ v1.0/v1.0/awk-awk-job.yaml | 3 +++ v1.0/v1.0/awk-awk.cwl | 13 +++++++++++++ 4 files changed, 29 insertions(+) create mode 100644 v1.0/v1.0/awk-awk-input create mode 100644 v1.0/v1.0/awk-awk-job.yaml create mode 100644 v1.0/v1.0/awk-awk.cwl diff --git a/v1.0/conformance_test_v1.0.yaml b/v1.0/conformance_test_v1.0.yaml index 1c871cc9..9b175d02 100644 --- a/v1.0/conformance_test_v1.0.yaml +++ b/v1.0/conformance_test_v1.0.yaml @@ -1593,3 +1593,14 @@ inputs are not present in the input object used to run the tool. should_fail: true tags: [ required ] + +- tool: v1.0/awk-awk.cwl + job: v1.0/awk-awk-job.yaml + doc: test quoting with multi-entry baseCommand + output: + bRegionsNonZero: + basename: awk-awk-input_nonZero.txt + class: File + checksum: "sha1$810037850eb6f1791e9365e25f124808828070e2" + size: 24 + tags: [ required ] diff --git a/v1.0/v1.0/awk-awk-input b/v1.0/v1.0/awk-awk-input new file mode 100644 index 00000000..7c16ebf2 --- /dev/null +++ b/v1.0/v1.0/awk-awk-input @@ -0,0 +1,2 @@ +this will be ignored 0 +this will be selected 1 diff --git a/v1.0/v1.0/awk-awk-job.yaml b/v1.0/v1.0/awk-awk-job.yaml new file mode 100644 index 00000000..c1fdd51d --- /dev/null +++ b/v1.0/v1.0/awk-awk-job.yaml @@ -0,0 +1,3 @@ +atoBComparison: + class: File + path: awk-awk-input diff --git a/v1.0/v1.0/awk-awk.cwl b/v1.0/v1.0/awk-awk.cwl new file mode 100644 index 00000000..860a8b20 --- /dev/null +++ b/v1.0/v1.0/awk-awk.cwl @@ -0,0 +1,13 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool +inputs: + atoBComparison: + type: File + inputBinding: + position: 1 +outputs: + bRegionsNonZero: + type: stdout +stdout: $(inputs.atoBComparison.basename)_nonZero.txt +baseCommand: [awk, "$5!=0"] From 128a460935af67af415faf37cb5921c1d16976a4 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Mon, 28 May 2018 02:14:38 -0700 Subject: [PATCH 2/2] clarify and expand --- v1.0/conformance_test_v1.0.yaml | 13 ++++++++++++- v1.0/v1.0/awk-awk2.cwl | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 v1.0/v1.0/awk-awk2.cwl diff --git a/v1.0/conformance_test_v1.0.yaml b/v1.0/conformance_test_v1.0.yaml index 9b175d02..7e9742c8 100644 --- a/v1.0/conformance_test_v1.0.yaml +++ b/v1.0/conformance_test_v1.0.yaml @@ -1596,7 +1596,18 @@ - tool: v1.0/awk-awk.cwl job: v1.0/awk-awk-job.yaml - doc: test quoting with multi-entry baseCommand + doc: test that a $ in the baseCommand is not interpreted by the shell + output: + bRegionsNonZero: + basename: awk-awk-input_nonZero.txt + class: File + checksum: "sha1$810037850eb6f1791e9365e25f124808828070e2" + size: 24 + tags: [ required ] + +- tool: v1.0/awk-awk2.cwl + job: v1.0/awk-awk-job.yaml + doc: test that a $ in an argument is not interpreted by the shell output: bRegionsNonZero: basename: awk-awk-input_nonZero.txt diff --git a/v1.0/v1.0/awk-awk2.cwl b/v1.0/v1.0/awk-awk2.cwl new file mode 100644 index 00000000..06660b11 --- /dev/null +++ b/v1.0/v1.0/awk-awk2.cwl @@ -0,0 +1,14 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 +class: CommandLineTool +inputs: + atoBComparison: + type: File + inputBinding: + position: 1 +outputs: + bRegionsNonZero: + type: stdout +stdout: $(inputs.atoBComparison.basename)_nonZero.txt +baseCommand: awk +arguments: ["$5!=0"]