@@ -47,6 +47,7 @@ def __init__(
4747 timeout : Optional [int ] = None ,
4848 verbose : Optional [bool ] = None ,
4949 runner_quiet : Optional [bool ] = None ,
50+ parse_inputs_only : Optional [bool ] = None ,
5051 ) -> None :
5152 """Initialize test configuration."""
5253 self .basedir : str = basedir or os .getcwd ()
@@ -63,6 +64,7 @@ def __init__(
6364 self .timeout : Optional [int ] = timeout
6465 self .verbose : bool = verbose or False
6566 self .runner_quiet : bool = runner_quiet or True
67+ self .parse_inputs_only : bool = parse_inputs_only or False
6668
6769
6870class CWLTestReport :
@@ -468,7 +470,7 @@ def run_test_plain(
468470 raise subprocess .CalledProcessError (return_code , " " .join (test_command ))
469471
470472 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 {}
472474 except subprocess .CalledProcessError as err :
473475 if err .returncode == UNSUPPORTED_FEATURE and REQUIRED not in test .get (
474476 "tags" , ["required" ]
@@ -593,7 +595,9 @@ def run_test_plain(
593595
594596 fail_message = ""
595597
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+ ):
597601 logger .warning (
598602 """Test %s failed: %s""" ,
599603 number ,
@@ -612,17 +616,18 @@ def run_test_plain(
612616 joburi ,
613617 )
614618
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 )
626631
627632 if config .outdir :
628633 shutil .rmtree (config .outdir , True )
0 commit comments