[code-reflection] RFR: Initial Testing Framework for HAT

Juan Fumero jfumero at openjdk.org
Wed Sep 10 11:04:27 UTC 2025


I added a testing framework for HAT. I will open a draft PR for the team to start playing with this. Any feedback is welcome. 


How to build and run? 

java @hat/bld

Run the whole suite for OpenCL:


java @hat/test suite ffi-opencl 


Run the whole suite for CUDA:


java @hat/test suite ffi-cuda 


Run a specific test:


java @hat/test ffi-opencl oracle.code.hat.TestArrays$testVectorAddition 

You can also combine with the usual Hat flags. For example, this enables printing of the codegen and info


HAT=SHOW_CODE,INFO java @hat/test ffi-opencl oracle.code.hat.TestArrays$testVectorAddition

-------------

Commit messages:
 - [hat] Test reductions added
 - [hat] Enable test suite
 - [hat] Testing matrices added
 - [hat] Testing framework improved
 - Add missing pom file
 - Add missing licenses
 - [hat] Add utility methods for testing
 - [hat] Testing single methods
 - [hat] scafolding for the testing framework

Changes: https://git.openjdk.org/babylon/pull/558/files
  Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=558&range=00
  Stats: 1820 lines in 17 files changed: 1775 ins; 1 del; 44 mod
  Patch: https://git.openjdk.org/babylon/pull/558.diff
  Fetch: git fetch https://git.openjdk.org/babylon.git pull/558/head:pull/558

PR: https://git.openjdk.org/babylon/pull/558


More information about the babylon-dev mailing list