[ARVADOS] created: 2.1.0-2361-g16628b89b
Git user
git at public.arvados.org
Tue Apr 19 17:24:09 UTC 2022
at 16628b89b26d26182f66a01a22e91af9307a3e57 (commit)
commit 16628b89b26d26182f66a01a22e91af9307a3e57
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Tue Apr 19 13:19:05 2022 -0400
18888: Ensure that default File/Directory references are normalized
Add test.
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/sdk/cwl/arvados_cwl/runner.py b/sdk/cwl/arvados_cwl/runner.py
index e5a81cdc7..7d4310b0e 100644
--- a/sdk/cwl/arvados_cwl/runner.py
+++ b/sdk/cwl/arvados_cwl/runner.py
@@ -358,6 +358,7 @@ def upload_dependencies(arvrunner, name, document_loader,
if "location" not in f and "path" in f:
f["location"] = f["path"]
del f["path"]
+ normalizeFilesDirs(f)
optional_deps.append(f)
visit_class(obj["default"], ("File", "Directory"), defaults_are_optional)
diff --git a/sdk/cwl/tests/18888-download_def.cwl b/sdk/cwl/tests/18888-download_def.cwl
new file mode 100644
index 000000000..2237c448e
--- /dev/null
+++ b/sdk/cwl/tests/18888-download_def.cwl
@@ -0,0 +1,29 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+cwlVersion: v1.2
+class: CommandLineTool
+
+$namespaces:
+ arv: "http://arvados.org/cwl#"
+
+requirements:
+ NetworkAccess:
+ networkAccess: true
+ arv:RuntimeConstraints:
+ outputDirType: keep_output_dir
+
+inputs:
+ scripts:
+ type: Directory
+ default:
+ class: Directory
+ location: scripts/
+outputs:
+ out:
+ type: Directory
+ outputBinding:
+ glob: "."
+
+arguments: [$(inputs.scripts.path)/download_all_data.sh, "."]
diff --git a/sdk/cwl/tests/arvados-tests.sh b/sdk/cwl/tests/arvados-tests.sh
index 7727ebfa0..9cb5234cf 100755
--- a/sdk/cwl/tests/arvados-tests.sh
+++ b/sdk/cwl/tests/arvados-tests.sh
@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: Apache-2.0
+set -e
+
if ! arv-get d7514270f356df848477718d58308cc4+94 > /dev/null ; then
arv-put --portable-data-hash testdir/*
fi
@@ -16,4 +18,6 @@ if ! arv-get 20850f01122e860fb878758ac1320877+71 > /dev/null ; then
arv-put --portable-data-hash samples/sample1_S01_R1_001.fastq.gz
fi
+arvados-cwl-runner 18888-download_def.cwl --scripts scripts/
+
exec cwltest --test arvados-tests.yml --tool arvados-cwl-runner $@ -- --disable-reuse --compute-checksum --api=containers
diff --git a/sdk/cwl/tests/scripts/download_all_data.sh b/sdk/cwl/tests/scripts/download_all_data.sh
new file mode 100755
index 000000000..d3a9d7876
--- /dev/null
+++ b/sdk/cwl/tests/scripts/download_all_data.sh
@@ -0,0 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+#!/bin/bash
+
+echo bubble
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list