File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -389,6 +389,11 @@ def check_all_types(
389
389
)
390
390
else :
391
391
parm_id = cast (str , sink [sourceField ])
392
+ if parm_id not in src_dict :
393
+ raise SourceLine (sink , sourceField , ValidationException ).makeError (
394
+ f"{ sourceField } not found: { parm_id } "
395
+ )
396
+
392
397
srcs_of_sink = [src_dict [parm_id ]]
393
398
linkMerge = None
394
399
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env cwl-runner
2
+ class: Workflow
3
+ cwlVersion: v1.0
4
+ inputs :
5
+ letters0:
6
+ type : string
7
+ default : "a0"
8
+
9
+ outputs :
10
+ all:
11
+ type : File
12
+ outputSource : echo_w
13
+
14
+ steps :
15
+ echo_w:
16
+ run : echo.cwl
17
+ in :
18
+ echo_in: letters0
19
+ out : [txt]
20
+
Original file line number Diff line number Diff line change @@ -1731,3 +1731,13 @@ def test_record_outputeval() -> None:
1731
1731
== "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709"
1732
1732
)
1733
1733
assert result ["annotation_gtf" ]["size" ] == 0
1734
+
1735
+
1736
+ def tests_outputsource_valid_identifier_invalid_source () -> None :
1737
+ """Confirm error for invalid source that was also a valid identifier."""
1738
+ tool_path = get_data ("tests/checker_wf/broken-wf4.cwl" )
1739
+ err_code , stdout , stderr = get_main_output ([tool_path ])
1740
+ assert err_code == 1
1741
+ stderr = re .sub (r"\s\s+" , " " , stderr )
1742
+ assert "tests/checker_wf/broken-wf4.cwl:12:5: outputSource not found" in stderr
1743
+ assert "tests/checker_wf/broken-wf4.cwl#echo_w" in stderr
You can’t perform that action at this time.
0 commit comments