Skip to content

Commit

Permalink
another lil bug fix in the verbose test mode instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
emarteca committed Jul 11, 2023
1 parent a6bb111 commit 123544e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/output_parsing/test_output_proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ def parse_jest_json_to_csv(output_file, new_output_file=None):
test_stdout += [";".join(test_results.get("failureMessages", []))]
test_pass_fail += [test_status] # passed/failed/pending -- if not present assume failed
res_df = pd.DataFrame(list(zip(test_suites, test_names, test_runtimes, test_stdout, test_pass_fail)))
res_df.columns = ["test_suite", "name", "runtime", "stdout", "pass_fail"]
with open(new_output_file, 'w') as csv_file:
csv_file.write(res_df.to_csv())
try:
res_df.columns = ["test_suite", "name", "runtime", "stdout", "pass_fail"]
with open(new_output_file, 'w') as csv_file:
csv_file.write(res_df.to_csv())
except:
print("ERROR in data for file " + new_output_file + " -- no output printed. skipping to next step...")
4 changes: 2 additions & 2 deletions src/test_JS_repo_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,8 @@ def instrument_test_command_for_verbose(test_script, test_infra, infra_verbosity
if infra_call == "" and i < len(infra_calls) - 1:
instrumented_test_command += [ "" ]
continue
# if the first call is non-empty, then it's pre-test-infra and we skip it too
elif infra_call != "" and i == 0:
# if the first call is non-empty and there's more than one call, then it's pre-test-infra and we skip it too
elif len(infra_calls) > 1 and infra_call != "" and i == 0:
instrumented_test_command += [ "" ]
continue
# get the arguments, splitting off from any other non-test commands that might be
Expand Down

0 comments on commit 123544e

Please sign in to comment.