Skip to content

Commit

Permalink
print command in verbose mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Sep 1, 2021
1 parent 6c38dbe commit 097088e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions cwltest/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"):
Expand All @@ -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()
Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -500,6 +498,7 @@ def main(): # type: () -> int
len(tests),
args.timeout,
args.junit_verbose,
args.verbose,
)
for i in ntest
]
Expand Down

0 comments on commit 097088e

Please sign in to comment.