Skip to content

Commit

Permalink
capture stdout and write to file
Browse files Browse the repository at this point in the history
  • Loading branch information
gijzelaerr committed Feb 20, 2017
1 parent c9fd6b9 commit d736a0e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 23 deletions.
18 changes: 9 additions & 9 deletions v1.0/conformance_test_v1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@
doc: Test hints with $import

- job: v1.0/recursive-input-directory.json
output:
output: {
output_dir: {
"basename": "work_dir",
"class": "Directory",
Expand Down Expand Up @@ -1023,17 +1023,17 @@
"location": "work_dir/e",
"size": 0
},
{
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"basename": "testresult",
"location": "work_dir/testresult",
"class": "File",
"size": 0
}
],
"location": "work_dir",
},
"test_result": {
"basename": "output.txt",
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"class": "File",
"location": "output.txt",
"size": 0
}

}



Expand Down
29 changes: 15 additions & 14 deletions v1.0/v1.0/recursive-input-directory.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,27 @@ requirements:
- entry: $(inputs.input_dir)
entryname: work_dir
writable: true
stdout: output.txt
baseCommand:
- bash
- '-c'
- 'touch work_dir/testresult;
touch work_dir/e;
if [ ! -w work_dir ]; then echo work_dir not writable >> work_dir/testresult; fi;
if [ -L work_dir ]; then echo work_dir is a symlink >> work_dir/testresult; fi;
if [ ! -w work_dir/a ]; then echo work_dir/a not writable >> work_dir/testresult; fi;
if [ -L work_dir/a ]; then echo work_dir/a is a symlink >> work_dir/testresult; fi;
if [ ! -w work_dir/c ]; then echo work_dir/c not writable >> work_dir/testresult; fi;
if [ -L work_dir/c ]; then echo work_dir/c is a symlink >> work_dir/testresult; fi;
if [ ! -w work_dir/c/d ]; then echo work_dir/c/d not writable >> work_dir/testresult; fi;
if [ -L work_dir/c/d ]; then echo work_dir/c/d is a symlink >> work_dir/testresult; fi;
if [ ! -w work_dir/e ]; then echo work_dir/e not writable >> work_dir/testresult; fi;
if [ -L work_dir/e ]; then echo work_dir/e is a symlink >> work_dir/testresult; fi;'

- '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
glob: work_dir
test_result:
type: stdout

0 comments on commit d736a0e

Please sign in to comment.