-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add reporting for llama testing and improve error handling #322
Changes from all commits
d2f4875
83326cc
b8d2b53
c81520c
8a7620a
694b61f
708dce2
cfa2c5f
e604c59
8825532
4c4f8f3
19f60c2
62cb450
ad35f7b
b9c18ad
67dc280
e0eb1de
8015b6f
9376d52
58be18b
23f2326
5324085
d2df09b
9c93c3f
83404b5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,3 +256,24 @@ def get_iree_flags(request: FixtureRequest): | |
model_path["iree_hal_target_backends"] = set_fixture_from_cli_option( | ||
request, "--iree-hal-target-backends", "iree_hal_target_backends" | ||
) | ||
|
||
|
||
# The following three functions allow us to add a "XFail Reason" column to the html reports for each test | ||
def pytest_html_results_table_header(cells): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you use these functions anywhere? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a comment. Yeah, these functions allow us to customize the html reports and add the XFail Reason column in the https://nod-ai.github.io/SHARK-Platform. |
||
cells.insert(2, "<th>XFail Reason</th>") | ||
|
||
|
||
def pytest_html_results_table_row(report, cells): | ||
if hasattr(report, "wasxfail"): | ||
cells.insert(2, f"<td>{report.wasxfail}</td>") | ||
else: | ||
cells.insert(2, f"<td></td>") | ||
|
||
|
||
@pytest.hookimpl(hookwrapper=True) | ||
def pytest_runtest_makereport(item, call): | ||
outcome = yield | ||
report = outcome.get_result() | ||
|
||
if report.when == "call" and hasattr(item, "wasxfail"): | ||
report.wasxfail = item.wasxfail |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
datasets==3.0.0 | ||
parameterized | ||
pytest==8.0.0 | ||
pytest-html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This broke the CI for PRs from forks, see #395. Sending a PR to deactivate this until fixed.