From dc16d134dc9955ad691613a6a99ec16943bcd63d Mon Sep 17 00:00:00 2001 From: GlassOfWhiskey Date: Wed, 4 Jan 2023 17:52:35 +0100 Subject: [PATCH] Removing JavaScript from loop tests --- tests/loop/add1.cwl | 13 +++++++++++++ tests/loop/all-output-loop-no-iteration.cwl | 11 +---------- tests/loop/all-output-loop.cwl | 11 +---------- tests/loop/test-index.yaml | 4 ++-- 4 files changed, 17 insertions(+), 22 deletions(-) create mode 100644 tests/loop/add1.cwl diff --git a/tests/loop/add1.cwl b/tests/loop/add1.cwl new file mode 100644 index 0000000..02bb278 --- /dev/null +++ b/tests/loop/add1.cwl @@ -0,0 +1,13 @@ +class: CommandLineTool +cwlVersion: v1.3.0-dev1 +baseCommand: ["echo"] +arguments: + - valueFrom: "\$(($(inputs.i1)+1))" +inputs: + i1: int +outputs: + o1: + type: stdout + loadContent: true + outputBinding: + outputEval: $(self.content) diff --git a/tests/loop/all-output-loop-no-iteration.cwl b/tests/loop/all-output-loop-no-iteration.cwl index 98e9715..18c6be0 100644 --- a/tests/loop/all-output-loop-no-iteration.cwl +++ b/tests/loop/all-output-loop-no-iteration.cwl @@ -1,8 +1,6 @@ #!/usr/bin/env cwl-runner cwlVersion: v1.3.0-dev1 class: Workflow -requirements: - InlineJavascriptRequirement: {} inputs: i1: int outputs: @@ -15,14 +13,7 @@ steps: loop: i1: o1 outputMethod: all - run: - class: ExpressionTool - inputs: - i1: int - outputs: - o1: int - expression: > - ${return {'o1': inputs.i1 + 1};} + run: add1.cwl in: i1: i1 out: [o1] diff --git a/tests/loop/all-output-loop.cwl b/tests/loop/all-output-loop.cwl index 959da94..d13287b 100644 --- a/tests/loop/all-output-loop.cwl +++ b/tests/loop/all-output-loop.cwl @@ -1,8 +1,6 @@ #!/usr/bin/env cwl-runner cwlVersion: v1.3.0-dev1 class: Workflow -requirements: - InlineJavascriptRequirement: {} inputs: i1: int outputs: @@ -15,14 +13,7 @@ steps: loop: i1: o1 outputMethod: all - run: - class: ExpressionTool - inputs: - i1: int - outputs: - o1: int - expression: > - ${return {'o1': inputs.i1 + 1};} + run: add1.cwl in: i1: i1 out: [o1] diff --git a/tests/loop/test-index.yaml b/tests/loop/test-index.yaml index 8fc3263..8eb3c97 100644 --- a/tests/loop/test-index.yaml +++ b/tests/loop/test-index.yaml @@ -48,7 +48,7 @@ doc: "Test a loop case with outputMethod set to all" output: o1: [2, 3, 4, 5, 6, 7, 8, 9, 10] - tags: [ conditional, loop, inline_javascript, workflow ] + tags: [ conditional, loop, workflow ] - job: single-var-loop-job.yml tool: all-output-loop-no-iteration.cwl @@ -56,7 +56,7 @@ doc: "Test a loop case with outputMethod set to all and a false condition" output: o1: [] - tags: [ conditional, loop, inline_javascript, workflow ] + tags: [ conditional, loop, workflow ] - job: two-vars-loop-job.yml tool: value-from-loop.cwl