Skip to content

Add dynamic PR testing with golden reference comparison#2664

Open
rjodinchr wants to merge 2 commits intoKhronosGroup:mainfrom
rjodinchr:ci
Open

Add dynamic PR testing with golden reference comparison#2664
rjodinchr wants to merge 2 commits intoKhronosGroup:mainfrom
rjodinchr:ci

Conversation

@rjodinchr
Copy link
Copy Markdown
Contributor

This commit introduces a new targeted testing capability to the GitHub Actions pipeline, allowing developers to run specific CTS commands on Pull Requests and automatically compare the results against a known baseline.

Key additions and changes:

  • Dynamic Test Triggers: Added a tests job to presubmit.yml that parses PR descriptions and commit messages for the [run-test: <command>] syntax. The CI environment is only provisioned and executed if a trigger is detected.
  • pocl Test Environment: The workflow sets up an Ubuntu 24.04 runner, installs necessary dependencies (LLVM 20, Vulkan SDK), and builds pocl (v7.1), OpenCL-ICD-Loader, and the OpenCL CTS with experimental features enabled.
  • Automated Result Comparison: Added ci/compare_results.py, a Python utility that compares the JSON output of the triggered tests against a predefined golden reference. It flags missing references and categorizes differences as "FIX", "REGRESSION", or "DIFFERENCE". Any differences marks the check as failing.
  • Golden Baseline: Introduced ci/pocl/golden.json to store the expected outcomes (pass, fail, skip) for tests on the pocl implementation. It is initially populated with baseline expectations for the test_computeinfo command. It will need to be populated by PR using the feature for all the other tests in the future.

[run-test: test_computeinfo]

This commit introduces a new targeted testing capability to the GitHub Actions
pipeline, allowing developers to run specific CTS commands on Pull Requests
and automatically compare the results against a known baseline.

Key additions and changes:
* Dynamic Test Triggers: Added a `tests` job to `presubmit.yml` that parses
  PR descriptions and commit messages for the `[run-test: <command>]` syntax.
  The CI environment is only provisioned and executed if a trigger is detected.
* pocl Test Environment: The workflow sets up an Ubuntu 24.04 runner, installs
  necessary dependencies (LLVM 20, Vulkan SDK), and builds `pocl` (v7.1),
  OpenCL-ICD-Loader, and the OpenCL CTS with experimental features enabled.
* Automated Result Comparison: Added `ci/compare_results.py`, a Python utility
  that compares the JSON output of the triggered tests against a predefined
  golden reference. It flags missing references and categorizes differences as
  "FIX", "REGRESSION", or "DIFFERENCE". Any differences marks the
  check as failing.
* Golden Baseline: Introduced `ci/pocl/golden.json` to store the expected
  outcomes (pass, fail, skip) for tests on the `pocl` implementation. It is
  initially populated with baseline expectations for the `test_computeinfo`
  command. It will need to be populated by PR using the feature for
  all the other tests in the future.

[run-test: test_computeinfo]
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.

1 participant