Skip to content
Merged
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
16 changes: 11 additions & 5 deletions build_tools/github_actions/test_executable_scripts/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
This is automatically set by the GitHub Actions workflow from the job_name field.
The script maps these job names to actual test directory names (e.g., "miopen" -> "MIOpen")
Defaults to "miopen" if not set.
TEST_TYPE: "quick" runs tests with "quick" category, otherwise runs "standard" category
TEST_TYPE: Test category to run - one of "quick", "standard", "comprehensive", or "full".
Defaults to "quick". Invalid values fall back to "quick" with an error message.
AMDGPU_FAMILIES: Parsed to extract GPU architecture (e.g., "gfx1151")

The script discovers GPU-specific labels via ctest --print-labels and runs the appropriate tests for the current GPU architecture.
Expand All @@ -26,6 +27,7 @@
THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR")
SCRIPT_DIR = Path(__file__).resolve().parent
THEROCK_DIR = SCRIPT_DIR.parent.parent.parent
VALID_TEST_CATEGORIES = {"quick", "standard", "comprehensive", "full"}
TEST_TYPE = os.getenv("TEST_TYPE", "quick")
AMDGPU_FAMILIES = os.getenv("AMDGPU_FAMILIES")

Expand Down Expand Up @@ -218,11 +220,15 @@ def build_ctest_command(category, gpu_arch, available_gpu_archs):


def main():
# Use only two categories for now - quick and standard - depending on TEST_TYPE.
if TEST_TYPE and TEST_TYPE.lower() == "quick":
category = TEST_TYPE.lower() if TEST_TYPE else "quick"
if category not in VALID_TEST_CATEGORIES:
print(
f"ERROR: Invalid TEST_TYPE '{TEST_TYPE}'. "
f"Must be one of: {', '.join(sorted(VALID_TEST_CATEGORIES))}. "
f"Falling back to 'quick'.",
file=sys.stderr,
)
category = "quick"
else:
category = "standard"

# Use AMDGPU_FAMILIES from environment variable, extract gfx<xxx> part
gpu_arch = ""
Expand Down
Loading