Skip to content

Commit

Permalink
identify test group instead of logs path
Browse files Browse the repository at this point in the history
Signed-off-by: tylertitsworth <[email protected]>
  • Loading branch information
tylertitsworth committed Oct 10, 2024
1 parent 696a6db commit 08d7754
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test-runner/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def get_test_list(args: dict, tests_yaml: List[dict]):
rmtree(args.logs_path)
os.makedirs(args.logs_path)
# Set up Logging for test-runner context
unique_identifier = args.logs_path.replace("/", "-")
test_group = os.path.dirname(args.file_path)
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
Expand Down Expand Up @@ -193,22 +193,20 @@ def get_test_list(args: dict, tests_yaml: List[dict]):
logging.error(err)
summary.append([idx + 1, test.name, "FAIL"])
json_summary.append(
{"Group": unique_identifier, "Test": test.name, "Status": "FAIL"}
{"Group": test_group, "Test": test.name, "Status": "FAIL"}
)
ERROR = True
continue
except KeyboardInterrupt:
summary.append([idx + 1, test.name, "FAIL"])
json_summary.append(
{"Group": unique_identifier, "Test": test.name, "Status": "FAIL"}
{"Group": test_group, "Test": test.name, "Status": "FAIL"}
)
ERROR = True
break
summary.append([idx + 1, test.name, "PASS"])
json_summary.append(
{"Group": unique_identifier, "Test": test.name, "Status": "PASS"}
)
json_summary_path = f"test-runner-summary-{unique_identifier}.json"
json_summary.append({"Group": test_group, "Test": test.name, "Status": "PASS"})
json_summary_path = f"test-runner-summary-{test_group}.json"

with open(json_summary_path, "w", encoding="utf-8") as file:
json.dump(json_summary, file, indent=4)
Expand Down

0 comments on commit 08d7754

Please sign in to comment.