Skip to content

upload ut_failure_list.csv as artifacts #1691

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

Merged
merged 2 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/scripts/check-ut.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def get_message(case):

return " ; ".join(error_messages) if error_messages else f"{case.result[0].message.splitlines()[0]}"

def print_md_row(row, print_header=False):
def print_md_row(row, print_header=False, failure_list=None):
if print_header:
header = " | ".join([f"{key}" for key in row.keys()])
print(f"| {header} |")
Expand All @@ -96,7 +96,11 @@ def print_md_row(row, print_header=False):
row_values = " | ".join([f"{value}" for value in row.values()])
print(f"| {row_values} |")

def print_failures():
if failure_list is not None:
failure_list.write(f"| {row_values} |\n")


def print_failures(failure_list=None):
if not failures:
return

Expand All @@ -109,7 +113,7 @@ def print_failures():
'Status': get_result(case),
'Message': get_message(case),
'Source': case['source'] if isinstance(case, dict) else 'XML'
}, print_header)
}, print_header, failure_list=failure_list)
print_header = False

def parse_log_file(log_file):
Expand Down Expand Up @@ -251,7 +255,8 @@ def main():
else:
print(f"Skipping unknown file type: {input_file}", file=sys.stderr)

print_failures()
with open("ut_failure_list.csv", "w") as failure_list:
print_failures(failure_list=failure_list)
print_summary()


Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/_linux_ut.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ jobs:
source activate xpu_op_${ZE_AFFINITY_MASK}
pip install junitparser
python .github/scripts/check-ut.py ${{ github.workspace }}/ut_log/*.xml >> $GITHUB_STEP_SUMMARY || true
if [ -e "ut_failure_list.csv" ];then
cp ut_failure_list.csv ${{ github.workspace }}/ut_log/ut_failure_list.csv
fi
- name: UT Test Results Check
shell: bash
run: |
Expand Down Expand Up @@ -325,7 +328,13 @@ jobs:
with:
name: Inductor-XPU-UT-Data-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log

- name: Upload XPU UT Failure list
if: always()
uses: actions/upload-artifact@v4
with:
name: XPU-UT-Failure-List-${{ github.event.pull_request.number || github.sha }}-${{ env.UT_NAME }}
path: ${{ github.workspace }}/ut_log/ut_failure_list.csv

distributed_ut_test:
runs-on: pvc_e2e
if: contains(inputs.ut, 'xpu_distributed')
Expand Down
Loading