Skip to content

Commit d736a0e

Browse files
committed
capture stdout and write to file
1 parent c9fd6b9 commit d736a0e

File tree

2 files changed

+24
-23
lines changed

2 files changed

+24
-23
lines changed

v1.0/conformance_test_v1.0.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@
983983
doc: Test hints with $import
984984

985985
- job: v1.0/recursive-input-directory.json
986-
output:
986+
output: {
987987
output_dir: {
988988
"basename": "work_dir",
989989
"class": "Directory",
@@ -1023,17 +1023,17 @@
10231023
"location": "work_dir/e",
10241024
"size": 0
10251025
},
1026-
{
1027-
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1028-
"basename": "testresult",
1029-
"location": "work_dir/testresult",
1030-
"class": "File",
1031-
"size": 0
1032-
}
10331026
],
10341027
"location": "work_dir",
1028+
},
1029+
"test_result": {
1030+
"basename": "output.txt",
1031+
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
1032+
"class": "File",
1033+
"location": "output.txt",
1034+
"size": 0
10351035
}
1036-
1036+
}
10371037

10381038

10391039

v1.0/v1.0/recursive-input-directory.cwl

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,27 @@ requirements:
77
- entry: $(inputs.input_dir)
88
entryname: work_dir
99
writable: true
10+
stdout: output.txt
1011
baseCommand:
1112
- bash
1213
- '-c'
13-
- 'touch work_dir/testresult;
14-
touch work_dir/e;
15-
if [ ! -w work_dir ]; then echo work_dir not writable >> work_dir/testresult; fi;
16-
if [ -L work_dir ]; then echo work_dir is a symlink >> work_dir/testresult; fi;
17-
if [ ! -w work_dir/a ]; then echo work_dir/a not writable >> work_dir/testresult; fi;
18-
if [ -L work_dir/a ]; then echo work_dir/a is a symlink >> work_dir/testresult; fi;
19-
if [ ! -w work_dir/c ]; then echo work_dir/c not writable >> work_dir/testresult; fi;
20-
if [ -L work_dir/c ]; then echo work_dir/c is a symlink >> work_dir/testresult; fi;
21-
if [ ! -w work_dir/c/d ]; then echo work_dir/c/d not writable >> work_dir/testresult; fi;
22-
if [ -L work_dir/c/d ]; then echo work_dir/c/d is a symlink >> work_dir/testresult; fi;
23-
if [ ! -w work_dir/e ]; then echo work_dir/e not writable >> work_dir/testresult; fi;
24-
if [ -L work_dir/e ]; then echo work_dir/e is a symlink >> work_dir/testresult; fi;'
25-
14+
- 'touch work_dir/e;
15+
if [ ! -w work_dir ]; then echo work_dir not writable; fi;
16+
if [ -L work_dir ]; then echo work_dir is a symlink; fi;
17+
if [ ! -w work_dir/a ]; then echo work_dir/a not writable; fi;
18+
if [ -L work_dir/a ]; then echo work_dir/a is a symlink; fi;
19+
if [ ! -w work_dir/c ]; then echo work_dir/c not writable; fi;
20+
if [ -L work_dir/c ]; then echo work_dir/c is a symlink; fi;
21+
if [ ! -w work_dir/c/d ]; then echo work_dir/c/d not writable; fi;
22+
if [ -L work_dir/c/d ]; then echo work_dir/c/d is a symlink; fi;
23+
if [ ! -w work_dir/e ]; then echo work_dir/e not writable; fi;
24+
if [ -L work_dir/e ]; then echo work_dir/e is a symlink ; fi;'
2625
inputs:
2726
input_dir: Directory
2827
outputs:
2928
output_dir:
3029
type: Directory
3130
outputBinding:
32-
glob: work_dir
31+
glob: work_dir
32+
test_result:
33+
type: stdout

0 commit comments

Comments
 (0)