Skip to content

Commit 0b31629

Browse files
author
Peter Amstutz
committed
Merge branch 'gijzelaerr-recursive_directory' into v1.0-errata
2 parents 51a5dd6 + 71efb7b commit 0b31629

File tree

6 files changed

+183
-1
lines changed

6 files changed

+183
-1
lines changed

v1.0/conformance_test_v1.0.yaml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,4 +1010,58 @@
10101010
args: [-A,'2',-B,baz,-C,'10','9','8','7','6','5','4','3','2','1']
10111011
job: v1.0/empty.json
10121012
tool: v1.0/inline-js.cwl
1013-
doc: Test InlineJavascriptRequirement with multiple expressions in the same tool
1013+
doc: Test InlineJavascriptRequirement with multiple expressions in the same tool
1014+
1015+
- job: v1.0/recursive-input-directory.yml
1016+
output:
1017+
output_dir: {
1018+
"basename": "work_dir",
1019+
"class": "Directory",
1020+
"listing": [
1021+
{
1022+
"basename": "a",
1023+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1024+
"class": "File",
1025+
"location": "work_dir/a",
1026+
"size": 0
1027+
},
1028+
{
1029+
"basename": "b",
1030+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1031+
"class": "File",
1032+
"location": "work_dir/b",
1033+
"size": 0
1034+
},
1035+
{
1036+
"basename": "c",
1037+
"class": "Directory",
1038+
"listing": [
1039+
{
1040+
"basename": "d",
1041+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1042+
"class": "File",
1043+
"location": "work_dir/c/d",
1044+
"size": 0
1045+
}
1046+
],
1047+
"location": "work_dir/c",
1048+
},
1049+
{
1050+
"basename": "e",
1051+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1052+
"class": "File",
1053+
"location": "work_dir/e",
1054+
"size": 0
1055+
},
1056+
],
1057+
"location": "work_dir",
1058+
}
1059+
test_result: {
1060+
"basename": "output.txt",
1061+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1062+
"class": "File",
1063+
"location": "output.txt",
1064+
"size": 0
1065+
}
1066+
tool: v1.0/recursive-input-directory.cwl
1067+
doc: Test if a writable input directory is recursivly copied and writable
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
cwlVersion: v1.0
2+
class: CommandLineTool
3+
requirements:
4+
- class: InlineJavascriptRequirement
5+
- class: InitialWorkDirRequirement
6+
listing:
7+
- entry: $(inputs.input_dir)
8+
entryname: work_dir
9+
writable: true
10+
- class: ShellCommandRequirement
11+
stdout: output.txt
12+
arguments:
13+
- shellQuote: false
14+
valueFrom: |
15+
touch work_dir/e;
16+
if [ ! -w work_dir ]; then echo work_dir not writable; fi;
17+
if [ -L work_dir ]; then echo work_dir is a symlink; fi;
18+
if [ ! -w work_dir/a ]; then echo work_dir/a not writable; fi;
19+
if [ -L work_dir/a ]; then echo work_dir/a is a symlink; fi;
20+
if [ ! -w work_dir/c ]; then echo work_dir/c not writable; fi;
21+
if [ -L work_dir/c ]; then echo work_dir/c is a symlink; fi;
22+
if [ ! -w work_dir/c/d ]; then echo work_dir/c/d not writable; fi;
23+
if [ -L work_dir/c/d ]; then echo work_dir/c/d is a symlink; fi;
24+
if [ ! -w work_dir/e ]; then echo work_dir/e not writable; fi;
25+
if [ -L work_dir/e ]; then echo work_dir/e is a symlink ; fi;
26+
inputs:
27+
input_dir: Directory
28+
outputs:
29+
output_dir:
30+
type: Directory
31+
outputBinding:
32+
glob: work_dir
33+
test_result:
34+
type: stdout
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
input_dir:
2+
class: Directory
3+
location: testdir

v1.1.0-dev1/conformance_test_v1.1.0-dev1.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,3 +1016,57 @@
10161016
job: v1.1.0-dev1/default_path_job.yml
10171017
tool: v1.1.0-dev1/default_path.cwl
10181018
doc: Test warning instead of error when default path is not found
1019+
1020+
- job: v1.1.0-dev1/recursive-input-directory.yml
1021+
output:
1022+
output_dir: {
1023+
"basename": "work_dir",
1024+
"class": "Directory",
1025+
"listing": [
1026+
{
1027+
"basename": "a",
1028+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1029+
"class": "File",
1030+
"location": "work_dir/a",
1031+
"size": 0
1032+
},
1033+
{
1034+
"basename": "b",
1035+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1036+
"class": "File",
1037+
"location": "work_dir/b",
1038+
"size": 0
1039+
},
1040+
{
1041+
"basename": "c",
1042+
"class": "Directory",
1043+
"listing": [
1044+
{
1045+
"basename": "d",
1046+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1047+
"class": "File",
1048+
"location": "work_dir/c/d",
1049+
"size": 0
1050+
}
1051+
],
1052+
"location": "work_dir/c",
1053+
},
1054+
{
1055+
"basename": "e",
1056+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1057+
"class": "File",
1058+
"location": "work_dir/e",
1059+
"size": 0
1060+
},
1061+
],
1062+
"location": "work_dir",
1063+
}
1064+
test_result: {
1065+
"basename": "output.txt",
1066+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1067+
"class": "File",
1068+
"location": "output.txt",
1069+
"size": 0
1070+
}
1071+
tool: v1.1.0-dev1/recursive-input-directory.cwl
1072+
doc: Test if a writable input directory is recursivly copied and writable
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
cwlVersion: v1.1.0-dev1
2+
class: CommandLineTool
3+
requirements:
4+
- class: InlineJavascriptRequirement
5+
- class: InitialWorkDirRequirement
6+
listing:
7+
- entry: $(inputs.input_dir)
8+
entryname: work_dir
9+
writable: true
10+
- class: ShellCommandRequirement
11+
stdout: output.txt
12+
arguments:
13+
- shellQuote: false
14+
valueFrom: |
15+
touch work_dir/e;
16+
if [ ! -w work_dir ]; then echo work_dir not writable; fi;
17+
if [ -L work_dir ]; then echo work_dir is a symlink; fi;
18+
if [ ! -w work_dir/a ]; then echo work_dir/a not writable; fi;
19+
if [ -L work_dir/a ]; then echo work_dir/a is a symlink; fi;
20+
if [ ! -w work_dir/c ]; then echo work_dir/c not writable; fi;
21+
if [ -L work_dir/c ]; then echo work_dir/c is a symlink; fi;
22+
if [ ! -w work_dir/c/d ]; then echo work_dir/c/d not writable; fi;
23+
if [ -L work_dir/c/d ]; then echo work_dir/c/d is a symlink; fi;
24+
if [ ! -w work_dir/e ]; then echo work_dir/e not writable; fi;
25+
if [ -L work_dir/e ]; then echo work_dir/e is a symlink ; fi;
26+
inputs:
27+
input_dir: Directory
28+
outputs:
29+
output_dir:
30+
type: Directory
31+
outputBinding:
32+
glob: work_dir
33+
test_result:
34+
type: stdout
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
input_dir:
2+
class: Directory
3+
location: testdir

0 commit comments

Comments
 (0)