From a98388fb52e598e3f72cfd7e3cf58b9a8f965b9e Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Fri, 16 Nov 2018 22:01:45 -0500 Subject: [PATCH] 14198: Tests for hints in different places Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- .../tests/federation/cases/hint-on-tool.cwl | 28 +++++++++++++++++ sdk/cwl/tests/federation/cases/hint-on-wf.cwl | 30 +++++++++++++++++++ .../cases/runner-home-step-remote.cwl | 4 +-- .../cases/runner-remote-step-home.cwl | 6 ++-- .../tests/federation/data/hint-on-tool.txt | 16 ++++++++++ sdk/cwl/tests/federation/data/hint-on-wf.txt | 16 ++++++++++ sdk/cwl/tests/federation/main.cwl | 18 +++++++---- 7 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 sdk/cwl/tests/federation/cases/hint-on-tool.cwl create mode 100644 sdk/cwl/tests/federation/cases/hint-on-wf.cwl create mode 100644 sdk/cwl/tests/federation/data/hint-on-tool.txt create mode 100644 sdk/cwl/tests/federation/data/hint-on-wf.txt diff --git a/sdk/cwl/tests/federation/cases/hint-on-tool.cwl b/sdk/cwl/tests/federation/cases/hint-on-tool.cwl new file mode 100644 index 0000000000..93e6d2c378 --- /dev/null +++ b/sdk/cwl/tests/federation/cases/hint-on-tool.cwl @@ -0,0 +1,28 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +cwlVersion: v1.0 +class: Workflow +$namespaces: + arv: "http://arvados.org/cwl#" +requirements: + InlineJavascriptRequirement: {} + DockerRequirement: + dockerPull: arvados/fed-test:hint-on-tool +inputs: + inp: + type: File + inputBinding: {} + runOnCluster: string +outputs: + hash: + type: File + outputSource: md5sum/hash +steps: + md5sum: + in: + inp: inp + runOnCluster: runOnCluster + out: [hash] + run: md5sum-tool-hint.cwl diff --git a/sdk/cwl/tests/federation/cases/hint-on-wf.cwl b/sdk/cwl/tests/federation/cases/hint-on-wf.cwl new file mode 100644 index 0000000000..43236599ed --- /dev/null +++ b/sdk/cwl/tests/federation/cases/hint-on-wf.cwl @@ -0,0 +1,30 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + +cwlVersion: v1.0 +class: Workflow +$namespaces: + arv: "http://arvados.org/cwl#" +requirements: + InlineJavascriptRequirement: {} + DockerRequirement: + dockerPull: arvados/fed-test:hint-on-wf +hints: + arv:ClusterTarget: + cluster_id: $(inputs.runOnCluster) +inputs: + inp: + type: File + inputBinding: {} + runOnCluster: string +outputs: + hash: + type: File + outputSource: md5sum/hash +steps: + md5sum: + in: + inp: inp + out: [hash] + run: md5sum.cwl diff --git a/sdk/cwl/tests/federation/cases/runner-home-step-remote.cwl b/sdk/cwl/tests/federation/cases/runner-home-step-remote.cwl index 67779f9aa0..182ca1ec4e 100644 --- a/sdk/cwl/tests/federation/cases/runner-home-step-remote.cwl +++ b/sdk/cwl/tests/federation/cases/runner-home-step-remote.cwl @@ -11,9 +11,7 @@ requirements: DockerRequirement: dockerPull: arvados/fed-test:runner-home-step-remote inputs: - inp: - type: File - inputBinding: {} + inp: File runOnCluster: string outputs: hash: diff --git a/sdk/cwl/tests/federation/cases/runner-remote-step-home.cwl b/sdk/cwl/tests/federation/cases/runner-remote-step-home.cwl index a74d2f5507..963c84f32c 100644 --- a/sdk/cwl/tests/federation/cases/runner-remote-step-home.cwl +++ b/sdk/cwl/tests/federation/cases/runner-remote-step-home.cwl @@ -11,9 +11,8 @@ requirements: DockerRequirement: dockerPull: arvados/fed-test:runner-remote-step-home inputs: - inp: - type: File - inputBinding: {} + inp: File + runOnCluster: string outputs: hash: type: File @@ -22,6 +21,7 @@ steps: md5sum: in: inp: inp + runOnCluster: runOnCluster out: [hash] hints: arv:ClusterTarget: diff --git a/sdk/cwl/tests/federation/data/hint-on-tool.txt b/sdk/cwl/tests/federation/data/hint-on-tool.txt new file mode 100644 index 0000000000..c396125741 --- /dev/null +++ b/sdk/cwl/tests/federation/data/hint-on-tool.txt @@ -0,0 +1,16 @@ +Call me hint-on-tool. Some years ago--never mind how long precisely--having +little or no money in my purse, and nothing particular to interest me on +shore, I thought I would sail about a little and see the watery part of +the world. It is a way I have of driving off the spleen and regulating +the circulation. Whenever I find myself growing grim about the mouth; +whenever it is a damp, drizzly November in my soul; whenever I find +myself involuntarily pausing before coffin warehouses, and bringing up +the rear of every funeral I meet; and especially whenever my hypos get +such an upper hand of me, that it requires a strong moral principle to +prevent me from deliberately stepping into the street, and methodically +knocking people's hats off--then, I account it high time to get to sea +as soon as I can. This is my substitute for pistol and ball. With a +philosophical flourish Cato throws himself upon his sword; I quietly +take to the ship. There is nothing surprising in this. If they but knew +it, almost all men in their degree, some time or other, cherish very +nearly the same feelings towards the ocean with me. diff --git a/sdk/cwl/tests/federation/data/hint-on-wf.txt b/sdk/cwl/tests/federation/data/hint-on-wf.txt new file mode 100644 index 0000000000..f4aa872e2d --- /dev/null +++ b/sdk/cwl/tests/federation/data/hint-on-wf.txt @@ -0,0 +1,16 @@ +Call me hint-on-wf. Some years ago--never mind how long precisely--having +little or no money in my purse, and nothing particular to interest me on +shore, I thought I would sail about a little and see the watery part of +the world. It is a way I have of driving off the spleen and regulating +the circulation. Whenever I find myself growing grim about the mouth; +whenever it is a damp, drizzly November in my soul; whenever I find +myself involuntarily pausing before coffin warehouses, and bringing up +the rear of every funeral I meet; and especially whenever my hypos get +such an upper hand of me, that it requires a strong moral principle to +prevent me from deliberately stepping into the street, and methodically +knocking people's hats off--then, I account it high time to get to sea +as soon as I can. This is my substitute for pistol and ball. With a +philosophical flourish Cato throws himself upon his sword; I quietly +take to the ship. There is nothing surprising in this. If they but knew +it, almost all men in their degree, some time or other, cherish very +nearly the same feelings towards the ocean with me. diff --git a/sdk/cwl/tests/federation/main.cwl b/sdk/cwl/tests/federation/main.cwl index d07cdfd18e..a00e6d3d9a 100755 --- a/sdk/cwl/tests/federation/main.cwl +++ b/sdk/cwl/tests/federation/main.cwl @@ -60,6 +60,12 @@ outputs: threestep-remote-success: type: Any outputSource: threestep-remote/success + hint-on-wf-success: + type: Any + outputSource: hint-on-wf/success + hint-on-tool-success: + type: Any + outputSource: hint-on-tool/success steps: base-case: @@ -495,9 +501,9 @@ steps: scrub_image: {default: "arvados/fed-test:hint-on-wf"} scrub_collections: default: - - 3bc373e38751fe13dcbd62778d583242+81 # input collection - - 428e6d91e41a3af3ae287b453949e7fd+51 # md5sum output collection - - a4b0ddd866525655e8480f83a1ca83c6+112 # runner output json + - 862433f328041b2525c90b1dc3c462fd+62 # input collection + - 9a68b0b9720977faba8a28e75a4398b7+51 # md5sum output collection + - 6a601cddb36ee2f766783b1aa9ff8d66+112 # runner output json out: [out, success] run: framework/testcase.cwl @@ -532,8 +538,8 @@ steps: scrub_image: {default: "arvados/fed-test:hint-on-tool"} scrub_collections: default: - - 3bc373e38751fe13dcbd62778d583242+81 # input collection - - 428e6d91e41a3af3ae287b453949e7fd+51 # md5sum output collection - - a4b0ddd866525655e8480f83a1ca83c6+112 # runner output json + - 6803004a4f8db9f8d1d54f6229851599+64 # input collection + - cacb0d56235564b5ff485c5b31215ab5+51 # md5sum output collection + - 2b50af43fdd84a9e906be2d54b92cddf+112 # runner output json out: [out, success] run: framework/testcase.cwl -- 2.30.2