@@ -47,6 +47,7 @@ def __init__(
47
47
timeout : Optional [int ] = None ,
48
48
verbose : Optional [bool ] = None ,
49
49
runner_quiet : Optional [bool ] = None ,
50
+ parse_inputs_only : Optional [bool ] = None ,
50
51
) -> None :
51
52
"""Initialize test configuration."""
52
53
self .basedir : str = basedir or os .getcwd ()
@@ -63,6 +64,7 @@ def __init__(
63
64
self .timeout : Optional [int ] = timeout
64
65
self .verbose : bool = verbose or False
65
66
self .runner_quiet : bool = runner_quiet or True
67
+ self .parse_inputs_only : bool = parse_inputs_only or False
66
68
67
69
68
70
class CWLTestReport :
@@ -468,7 +470,7 @@ def run_test_plain(
468
470
raise subprocess .CalledProcessError (return_code , " " .join (test_command ))
469
471
470
472
logger .debug ('outstr: "%s".' , outstr )
471
- out = json .loads (outstr ) if outstr else {}
473
+ out = json .loads (outstr ) if not config . parse_inputs_only and outstr else {}
472
474
except subprocess .CalledProcessError as err :
473
475
if err .returncode == UNSUPPORTED_FEATURE and REQUIRED not in test .get (
474
476
"tags" , ["required" ]
@@ -593,7 +595,9 @@ def run_test_plain(
593
595
594
596
fail_message = ""
595
597
596
- if test .get ("should_fail" , False ):
598
+ if test .get ("should_fail" , False ) and not (
599
+ config .parse_inputs_only and "inputs_should_parse" in test .get ("tags" , [])
600
+ ):
597
601
logger .warning (
598
602
"""Test %s failed: %s""" ,
599
603
number ,
@@ -612,17 +616,18 @@ def run_test_plain(
612
616
joburi ,
613
617
)
614
618
615
- try :
616
- compare (test .get ("output" ), out )
617
- except CompareFail as ex :
618
- logger .warning (
619
- """Test %s failed: %s""" ,
620
- number ,
621
- shlex .join (test_command ),
622
- )
623
- logger .warning (test .get ("doc" , "" ).replace ("\n " , " " ).strip ())
624
- logger .warning ("Compare failure %s" , ex )
625
- fail_message = str (ex )
619
+ if not config .parse_inputs_only :
620
+ try :
621
+ compare (test .get ("output" ), out )
622
+ except CompareFail as ex :
623
+ logger .warning (
624
+ """Test %s failed: %s""" ,
625
+ number ,
626
+ shlex .join (test_command ),
627
+ )
628
+ logger .warning (test .get ("doc" , "" ).replace ("\n " , " " ).strip ())
629
+ logger .warning ("Compare failure %s" , ex )
630
+ fail_message = str (ex )
626
631
627
632
if config .outdir :
628
633
shutil .rmtree (config .outdir , True )
0 commit comments