diff --git a/.github/scripts/check-ut.py b/.github/scripts/check-ut.py index 5758c4e6d1..5d4b189e88 100644 --- a/.github/scripts/check-ut.py +++ b/.github/scripts/check-ut.py @@ -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} |") @@ -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 @@ -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): @@ -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() diff --git a/.github/workflows/_linux_ut.yml b/.github/workflows/_linux_ut.yml index e269a1ab35..b2abfd1ec2 100644 --- a/.github/workflows/_linux_ut.yml +++ b/.github/workflows/_linux_ut.yml @@ -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: | @@ -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')