File tree Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -313,6 +313,7 @@ def _capture_files(f):
313
313
else :
314
314
sf_required = True
315
315
316
+
316
317
if "$(" in sf ["pattern" ] or "${" in sf ["pattern" ]:
317
318
sfpath = self .do_eval (sf ["pattern" ], context = datum )
318
319
else :
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ def update_secondaryFiles(t):
50
50
if isinstance (t , MutableSequence ):
51
51
return [{"pattern" : p } for p in t ]
52
52
else :
53
- return t
53
+ return { "pattern" : t }
54
54
55
55
def fix_inputBinding (t ):
56
56
for i in t ["inputs" ]:
Original file line number Diff line number Diff line change
1
+ cwlVersion: v1.0
2
+ class: CommandLineTool
3
+ baseCommand :
4
+ - touch
5
+ - 2.fastq
6
+ requirements :
7
+ - class: InitialWorkDirRequirement
8
+ listing :
9
+ - $(inputs.fasta_path)
10
+ inputs :
11
+ fasta_path:
12
+ type : File
13
+ secondaryFiles : ^.fastq
14
+ outputs :
15
+ fasta:
16
+ type : File
17
+ secondaryFiles : ^.fastq
18
+ outputBinding :
19
+ glob : $(inputs.fasta_path.basename)
Original file line number Diff line number Diff line change @@ -790,7 +790,7 @@ def test_cid_file_w_prefix(tmpdir):
790
790
791
791
@needs_docker
792
792
class TestSecondaryFiles ():
793
- def test_secondary_files (self ):
793
+ def test_secondary_files_v1_1 (self ):
794
794
test_file = "secondary-files.cwl"
795
795
test_job_file = "secondary-files-job.yml"
796
796
try :
@@ -805,6 +805,23 @@ def test_secondary_files(self):
805
805
assert "completed success" in stderr
806
806
assert error_code == 0
807
807
808
+ def test_secondary_files_v1_0 (self ):
809
+ test_file = "secondary-files-string-v1.cwl"
810
+ test_job_file = "secondary-files-job.yml"
811
+ try :
812
+ old_umask = os .umask (stat .S_IWOTH ) # test run with umask 002
813
+ error_code , _ , stderr = get_main_output (
814
+ [
815
+ get_data (os .path .join ("tests" , test_file )),
816
+ get_data (os .path .join ("tests" , test_job_file ))
817
+ ]
818
+ )
819
+ finally :
820
+ assert stat .S_IMODE (os .stat ('lsout' ).st_mode ) == 436 # 664 in octal, '-rw-rw-r--'
821
+ os .umask (old_umask ) # revert back to original umask
822
+ assert "completed success" in stderr
823
+ assert error_code == 0
824
+
808
825
809
826
@needs_docker
810
827
class TestCache ():
You can’t perform that action at this time.
0 commit comments