Skip to content

Commit

Permalink
Merge branch 'recursive_directory' of https://github.com/gijzelaerr/c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Amstutz committed Jul 20, 2017
2 parents c50c150 + d736a0e commit 71efb7b
Show file tree
Hide file tree
Showing 6 changed files with 183 additions and 1 deletion.
56 changes: 55 additions & 1 deletion v1.0/conformance_test_v1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -995,4 +995,58 @@
args: [-A,'2',-B,baz,-C,'10','9','8','7','6','5','4','3','2','1']
job: v1.0/empty.json
tool: v1.0/inline-js.cwl
doc: Test InlineJavascriptRequirement with multiple expressions in the same tool
doc: Test InlineJavascriptRequirement with multiple expressions in the same tool

- job: v1.0/recursive-input-directory.yml
output:
output_dir: {
"basename": "work_dir",
"class": "Directory",
"listing": [
{
"basename": "a",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/a",
"size": 0
},
{
"basename": "b",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/b",
"size": 0
},
{
"basename": "c",
"class": "Directory",
"listing": [
{
"basename": "d",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/c/d",
"size": 0
}
],
"location": "work_dir/c",
},
{
"basename": "e",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/e",
"size": 0
},
],
"location": "work_dir",
}
test_result: {
"basename": "output.txt",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "output.txt",
"size": 0
}
tool: v1.0/recursive-input-directory.cwl
doc: Test if a writable input directory is recursivly copied and writable
34 changes: 34 additions & 0 deletions v1.0/v1.0/recursive-input-directory.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cwlVersion: v1.0
class: CommandLineTool
requirements:
- class: InlineJavascriptRequirement
- class: InitialWorkDirRequirement
listing:
- entry: $(inputs.input_dir)
entryname: work_dir
writable: true
- class: ShellCommandRequirement
stdout: output.txt
arguments:
- shellQuote: false
valueFrom: |
touch work_dir/e;
if [ ! -w work_dir ]; then echo work_dir not writable; fi;
if [ -L work_dir ]; then echo work_dir is a symlink; fi;
if [ ! -w work_dir/a ]; then echo work_dir/a not writable; fi;
if [ -L work_dir/a ]; then echo work_dir/a is a symlink; fi;
if [ ! -w work_dir/c ]; then echo work_dir/c not writable; fi;
if [ -L work_dir/c ]; then echo work_dir/c is a symlink; fi;
if [ ! -w work_dir/c/d ]; then echo work_dir/c/d not writable; fi;
if [ -L work_dir/c/d ]; then echo work_dir/c/d is a symlink; fi;
if [ ! -w work_dir/e ]; then echo work_dir/e not writable; fi;
if [ -L work_dir/e ]; then echo work_dir/e is a symlink ; fi;
inputs:
input_dir: Directory
outputs:
output_dir:
type: Directory
outputBinding:
glob: work_dir
test_result:
type: stdout
3 changes: 3 additions & 0 deletions v1.0/v1.0/recursive-input-directory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
input_dir:
class: Directory
location: testdir
54 changes: 54 additions & 0 deletions v1.1.0-dev1/conformance_test_v1.1.0-dev1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1001,3 +1001,57 @@
job: v1.1.0-dev1/default_path_job.yml
tool: v1.1.0-dev1/default_path.cwl
doc: Test warning instead of error when default path is not found

- job: v1.1.0-dev1/recursive-input-directory.yml
output:
output_dir: {
"basename": "work_dir",
"class": "Directory",
"listing": [
{
"basename": "a",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/a",
"size": 0
},
{
"basename": "b",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/b",
"size": 0
},
{
"basename": "c",
"class": "Directory",
"listing": [
{
"basename": "d",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/c/d",
"size": 0
}
],
"location": "work_dir/c",
},
{
"basename": "e",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "work_dir/e",
"size": 0
},
],
"location": "work_dir",
}
test_result: {
"basename": "output.txt",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "output.txt",
"size": 0
}
tool: v1.1.0-dev1/recursive-input-directory.cwl
doc: Test if a writable input directory is recursivly copied and writable
34 changes: 34 additions & 0 deletions v1.1.0-dev1/v1.1.0-dev1/recursive-input-directory.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
cwlVersion: v1.1.0-dev1
class: CommandLineTool
requirements:
- class: InlineJavascriptRequirement
- class: InitialWorkDirRequirement
listing:
- entry: $(inputs.input_dir)
entryname: work_dir
writable: true
- class: ShellCommandRequirement
stdout: output.txt
arguments:
- shellQuote: false
valueFrom: |
touch work_dir/e;
if [ ! -w work_dir ]; then echo work_dir not writable; fi;
if [ -L work_dir ]; then echo work_dir is a symlink; fi;
if [ ! -w work_dir/a ]; then echo work_dir/a not writable; fi;
if [ -L work_dir/a ]; then echo work_dir/a is a symlink; fi;
if [ ! -w work_dir/c ]; then echo work_dir/c not writable; fi;
if [ -L work_dir/c ]; then echo work_dir/c is a symlink; fi;
if [ ! -w work_dir/c/d ]; then echo work_dir/c/d not writable; fi;
if [ -L work_dir/c/d ]; then echo work_dir/c/d is a symlink; fi;
if [ ! -w work_dir/e ]; then echo work_dir/e not writable; fi;
if [ -L work_dir/e ]; then echo work_dir/e is a symlink ; fi;
inputs:
input_dir: Directory
outputs:
output_dir:
type: Directory
outputBinding:
glob: work_dir
test_result:
type: stdout
3 changes: 3 additions & 0 deletions v1.1.0-dev1/v1.1.0-dev1/recursive-input-directory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
input_dir:
class: Directory
location: testdir

0 comments on commit 71efb7b

Please sign in to comment.