Skip to content

[UR][CI] Add unified test result reporting for UR tests - #22909

Open
kekaczma wants to merge 11 commits into
intel:syclfrom
kekaczma:ur-ci-test-tools
Open

[UR][CI] Add unified test result reporting for UR tests#22909
kekaczma wants to merge 11 commits into
intel:syclfrom
kekaczma:ur-ci-test-tools

Conversation

@kekaczma

Copy link
Copy Markdown
Contributor

Introduce common tooling for collecting and reporting results from UR conformance and adapter-specific test executions.

The implementation:

  • provides a common execution and reporting path for UR test suites,
  • collects detailed test statuses and execution statistics,
  • parses LIT output and JUnit XML to obtain test-level information,
  • generates human-readable console output and GitHub Step Summary,
  • preserves full execution logs and XML results as CI artifacts,
  • separates test execution, result parsing, and summary generation to support future consumers of test result data.

This is the first implementation step towards a broader test management and test health monitoring system. Database integration, historical analysis, and automated PR triage are outside the scope of this change.

Introduce common tooling for collecting and reporting results from UR conformance and adapter-specific test executions.

The implementation:
- provides a common execution and reporting path for UR test suites,
- collects detailed test statuses and execution statistics,
- parses LIT output and JUnit XML to obtain test-level information,
- generates human-readable console output and GitHub Step Summary,
- preserves full execution logs and XML results as CI artifacts,
- separates test execution, result parsing, and summary generation to support future consumers of test result data.

This is the first implementation step towards a broader test management and test health monitoring system. Database integration, historical analysis, and automated PR triage are outside the scope of this change.
@kekaczma
kekaczma marked this pull request as ready for review August 19, 2026 14:17
@kekaczma
kekaczma requested review from a team as code owners August 19, 2026 14:17
@kekaczma

Copy link
Copy Markdown
Contributor Author

failing test is related with known issue #22858

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: this should be enough on GitHub, but we could consider copying these artifacts and storing them on a server for longer.

Comment thread devops/scripts/ur_test_tools/__init__.py Outdated
Comment thread devops/scripts/ur_test_tools/cli.py Outdated
Comment thread devops/scripts/ur_test_tools/summary_generator.py Outdated
Comment thread devops/scripts/ur_test_tools/constants.py
Comment thread devops/scripts/ur_test_tools/test_runner.py Outdated

@rbanka1 rbanka1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are also a lot of unnecessary comments, I think most of them could be deleted

Comment thread .github/workflows/ur-build-hw.yml Outdated
build_dir: build
artifact_name: 'ur-${{matrix.adapter.name}}-${{steps.artifact_suffix.outputs.suffix}}-adapter-specific'
# Don't run adapter specific tests when building multiple adapters
if: ${{ matrix.adapter.other_name == '' }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In workflow files, please place if: before uses: / with: to match the usual convention in this repo.

Comment thread devops/actions/run-tests/ur/action.yml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adapter_tests_results.xml is effectively a dead path

Comment thread devops/actions/run-tests/ur/action.yml Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adapter_tests_results.xml is effectively a dead path

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. You're right — this fallback is effectively a dead path, since the runner is responsible for providing the actual XML output path. I'll remove it and rely on the runner output instead. If no XML path is provided, it will be treated as unavailable rather than trying to guess a fallback filename.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused Iterator from the typing import

Comment thread unified-runtime/test/CMakeLists.txt Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LIT options are defined in two places: devops/scripts/ur_test_tools/test_runner.py via lit_opts and hardcoded flags in unified-runtime/test/**/CMakeLists.txt when UR_STANDALONE_BUILD=ON. Integrated ur-build-hw uses the Python path; standalone builds use CMake. effectively we have two places to maintain the same intention

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I agree that the reporting-related LIT options currently express the same intention in two places and could drift over time.

I'll move the shared reporting options on the Python side out of test_runner.py into a documented LIT_COMMON_REPORTING_OPTIONS constant, leaving only CI-specific and dynamically constructed options in the runner. I'll also document the corresponding standalone options in the relevant CMakeLists.txt files and add an explicit reference to the shared reporting configuration so that the relationship is visible when either side is modified.

I don't think the two invocations should be made fully identical, though. The integrated CI path needs verbose output and JUnit XML for parsing/reporting, while standalone execution is developer-facing and uses --succinct, so options such as -v vs --succinct are intentionally different.

I considered introducing a single configuration file consumed by both CMake and Python, but for this small set of options that would add extra coupling and complexity. I'd prefer to keep the two execution paths independent while making the shared reporting intent explicit and documented.

Comment thread .ci/requirements.txt Outdated
junitparser==3.2.0
google-cloud-storage==3.3.0
PyGithub==2.8.1
defusedxml==0.7.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ur-build-hw, defusedxml in unified-runtime/third_party/requirements_testing.txt is sufficient. here is unnecessary

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it returns the count from the first matching stats line only, not the sum of both but LIT emits separate stat lines for both. So probably we could miss some data

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. The parser now accumulates counts from repeated statistics lines instead of keeping only the first match, so no data is lost.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right now, the Skipped and Unsupported categories are treated interchangeably in several places, while LIT output keeps them separate. that makes the summary hard to read, please split or keep one group with a clear title

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Skipped and Unsupported are now kept as separate statuses throughout parsing, reconciliation, and reporting, consistent with LIT output. The summary reports them as separate categories as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could consider writing the test summary to $GITHUB_STEP_SUMMARY, similar to other devops/actions/run-tests/* flows, so devs could see results on the workflow run page without opening each job and expanding steps. for example https://github.com/intel/llvm/actions/runs/32737557539
I think it will be minimal change with big benefit devops/scripts/ur-test summary "$LOG_FILE" "${XML_FILE:-}" | tee -a "$GITHUB_STEP_SUMMARY"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented. I added a compact GitHub Step Summary with aggregated statistics and testing time. Test names are included only for statuses requiring attention (failed, unexpected pass, timeout and unresolved), with the list capped to keep the workflow summary readable.

@kekaczma
kekaczma marked this pull request as draft August 28, 2026 06:09
Clarify the distinction between common reporting options (what test
categories to show) and execution-specific options (how to format
output for CI vs standalone builds).
New architecture:
- Parser layer: produces ParsedLogData and ParsedXMLData observations
- Reconciliation layer: combines observations into TestRunResult
- Summary generator: consumes TestRunResult with group_by_status()
This change introduces common test result collection and reporting for Unified Runtime conformance and adapter-specific CI tests.

Compared to the initial version, the implementation has been updated based on review feedback to:

- keep LIT test statuses such as SKIPPED and UNSUPPORTED distinct,
- reconcile LIT and JUnit XML results without losing LIT-specific status information,
- separate test execution, parsing, reconciliation, and presentation responsibilities,
- simplify the internal API and remove redundant wrappers and helpers,
- keep CI reporting options separate from execution-specific LIT options.

Focused regression tests were added for the non-trivial result mapping and reconciliation behavior identified during review.
@kekaczma
kekaczma marked this pull request as ready for review September 4, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants