From 097088ecfd599c7a096e9d3fc05d458456d2a641 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" Date: Wed, 1 Sep 2021 16:18:17 +0200 Subject: [PATCH] print command in verbose mode --- cwltest/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cwltest/__init__.py b/cwltest/__init__.py index d2d40aa..577a19f 100755 --- a/cwltest/__init__.py +++ b/cwltest/__init__.py @@ -96,6 +96,7 @@ def run_test( test_number, # type: int total_tests, # type: int timeout, # type: int + junit_verbose=False, # type: bool verbose=False, # type: bool ): # type: (...) -> TestResult @@ -115,7 +116,7 @@ def run_test( process = None # type: Optional[subprocess.Popen[str]] cwd = os.getcwd() test_command = prepare_test_command( - args.tool, args.args, args.testargs, test, cwd, verbose + args.tool, args.args, args.testargs, test, cwd, junit_verbose ) if test.get("short_name"): @@ -135,6 +136,8 @@ def run_test( "%sTest [%i/%i] %s%s\n" % (prefix, test_number, total_tests, test.get("doc"), suffix) ) + if verbose: + sys.stderr.write(f"Running: {' '.join(test_command)}\n") sys.stderr.flush() start_time = time.time() @@ -386,12 +389,7 @@ def main(): # type: () -> int "utf-8" ) } # type: Optional[Dict[str, Union[str, Graph, bool]]] - ( - document_loader, - avsc_names, - _, - _, - ) = schema_salad.schema.load_schema( + (document_loader, avsc_names, _, _,) = schema_salad.schema.load_schema( "https://w3id.org/cwl/cwltest/cwltest-schema.yml", cache=cache ) @@ -500,6 +498,7 @@ def main(): # type: () -> int len(tests), args.timeout, args.junit_verbose, + args.verbose, ) for i in ntest ]