From ddb838fe038f97de69756daca06ac319d1011276 Mon Sep 17 00:00:00 2001 From: Caroline Ott Date: Fri, 19 Jul 2024 11:23:37 +0200 Subject: [PATCH] add test strings --- tests/CWL/ARCtrl.CWL.Tests.fsproj | 1 + tests/CWL/TestUtil.fs | 89 +++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 tests/CWL/TestUtil.fs diff --git a/tests/CWL/ARCtrl.CWL.Tests.fsproj b/tests/CWL/ARCtrl.CWL.Tests.fsproj index d39c55f7..129e0ae9 100644 --- a/tests/CWL/ARCtrl.CWL.Tests.fsproj +++ b/tests/CWL/ARCtrl.CWL.Tests.fsproj @@ -6,6 +6,7 @@ false + diff --git a/tests/CWL/TestUtil.fs b/tests/CWL/TestUtil.fs new file mode 100644 index 00000000..4c90383a --- /dev/null +++ b/tests/CWL/TestUtil.fs @@ -0,0 +1,89 @@ +module TestUtil + +let outputs ="""outputs: + output: + type: File + outputBinding: + glob: ./arc/runs/fsResult1/result.csv + example: + type: Directory + outputBinding: + glob: ./arc/runs/fsResult1/example.csv + exampleArray1: + type: File[] + outputBinding: + glob: ./arc/runs/fsResult1/example.csv + exampleArray2: + type: + type: array + items: File + outputBinding: + glob: ./arc/runs/fsResult1/example.csv""" + +let inputs ="""inputs: + arcDirectory: + type: Directory + firstArg: + type: File + inputBinding: + position: 1 + prefix: --example + secondArg: + type: string + inputBinding: + position: 2 + separate: false""" + +let requirements ="""requirements: + - class: DockerRequirement + dockerImageId: "devcontainer" + dockerFile: {$include: "FSharpArcCapsule/Dockerfile"} + - class: InitialWorkDirRequirement + listing: + - entryname: arc + entry: $(inputs.arcDirectory) + writable: true + - class: EnvVarRequirement + envDef: + - envName: DOTNET_NOLOGO + envValue: "true" + - class: NetworkAccess + networkAccess: true""" + +let cwl ="""cwlVersion: v1.2 +class: CommandLineTool +hints: + - class: DockerRequirement + dockerPull: mcr.microsoft.com/dotnet/sdk:6.0 +requirements: + - class: InitialWorkDirRequirement + listing: + - entryname: script.fsx + entry: + $include: script.fsx + - class: EnvVarRequirement + envDef: + - envName: DOTNET_NOLOGO + envValue: "true" + - class: NetworkAccess + networkAccess: true +baseCommand: [dotnet, fsi, script.fsx] +inputs: + firstArg: + type: File + inputBinding: + position: 1 + secondArg: + type: string + inputBinding: + position: 2 + +outputs: + output: + type: Directory + outputBinding: + glob: $(runtime.outdir)/.nuget + output2: + type: File + outputBinding: + glob: $(runtime.outdir)/*.csv""" \ No newline at end of file