[ARVADOS] created: 1.3.0-891-g185c640d5
Git user
git at public.curoverse.com
Mon May 20 19:46:49 UTC 2019
at 185c640d59da6666897312b4f8ccd04b6e170f2a (commit)
commit 185c640d59da6666897312b4f8ccd04b6e170f2a
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Mon May 20 15:46:17 2019 -0400
15241: Fix input bare collection as directory
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/sdk/cwl/arvados_cwl/arvcontainer.py b/sdk/cwl/arvados_cwl/arvcontainer.py
index b194f3dfc..ec144abf3 100644
--- a/sdk/cwl/arvados_cwl/arvcontainer.py
+++ b/sdk/cwl/arvados_cwl/arvcontainer.py
@@ -155,7 +155,7 @@ class ArvadosContainer(JobBase):
vwd.mkdirs(p.target)
else:
source, path = self.arvrunner.fs_access.get_collection(p.resolved)
- vwd.copy(path, p.target, source_collection=source)
+ vwd.copy(path or ".", p.target, source_collection=source)
elif p.type == "CreateFile":
if self.arvrunner.secret_store.has_secret(p.resolved):
secret_mounts["%s/%s" % (self.outdir, p.target)] = {
diff --git a/sdk/cwl/tests/15241-writable-dir-job.json b/sdk/cwl/tests/15241-writable-dir-job.json
new file mode 100644
index 000000000..f30578e1b
--- /dev/null
+++ b/sdk/cwl/tests/15241-writable-dir-job.json
@@ -0,0 +1,6 @@
+{
+ "filesDir": {
+ "location": "keep:d7514270f356df848477718d58308cc4+94",
+ "class": "Directory"
+ }
+}
diff --git a/sdk/cwl/tests/15241-writable-dir.cwl b/sdk/cwl/tests/15241-writable-dir.cwl
new file mode 100644
index 000000000..bfd17f7a3
--- /dev/null
+++ b/sdk/cwl/tests/15241-writable-dir.cwl
@@ -0,0 +1,20 @@
+cwlVersion: v1.0
+class: CommandLineTool
+
+requirements:
+ - class: InitialWorkDirRequirement
+ listing:
+ - entry: $(inputs.filesDir)
+ writable: true
+
+inputs:
+ filesDir:
+ type: Directory
+
+outputs:
+ results:
+ type: Directory
+ outputBinding:
+ glob: .
+
+arguments: [touch, $(inputs.filesDir.path)/blurg.txt]
diff --git a/sdk/cwl/tests/arvados-tests.yml b/sdk/cwl/tests/arvados-tests.yml
index 8b8ff28c7..d649c3bf6 100644
--- a/sdk/cwl/tests/arvados-tests.yml
+++ b/sdk/cwl/tests/arvados-tests.yml
@@ -243,3 +243,58 @@
}
tool: 13931-size.cwl
doc: Test that size is set for files in Keep
+
+- job: 15241-writable-dir-job.json
+ output: {
+ "results": {
+ "basename": "keep:6dd5fa20622d5a7a23c9147d0927da2a+180",
+ "class": "Directory",
+ "listing": [
+ {
+ "basename": "d7514270f356df848477718d58308cc4+94",
+ "class": "Directory",
+ "listing": [
+ {
+ "basename": "a",
+ "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+ "class": "File",
+ "location": "a",
+ "size": 0
+ },
+ {
+ "basename": "blurg.txt",
+ "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+ "class": "File",
+ "location": "blurg.txt",
+ "size": 0
+ },
+ {
+ "basename": "c",
+ "class": "Directory",
+ "listing": [
+ {
+ "basename": "d",
+ "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+ "class": "File",
+ "location": "d",
+ "size": 0
+ }
+ ],
+ "location": "c"
+ },
+ {
+ "basename": "b",
+ "checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
+ "class": "File",
+ "location": "b",
+ "size": 0
+ }
+ ],
+ "location": "d7514270f356df848477718d58308cc4+94"
+ }
+ ],
+ "location": "keep:6dd5fa20622d5a7a23c9147d0927da2a+180"
+ }
+ }
+ tool: 15241-writable-dir.cwl
+ doc: Test for writable collections
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list