From 588d41e8fe4edb1b309a7e0e70f82640c56e15f1 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 11 Mar 2026 13:43:10 -0700 Subject: [PATCH 1/6] Adding test filter options for labels --- build_tools/github_actions/configure_ci.py | 16 +++++++- .../github_actions/tests/configure_ci_test.py | 39 ++++++++++++++++++- docs/development/ci_behavior_manipulation.md | 1 + 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 498759e649b..d7b69ff9a41 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -648,8 +648,8 @@ def main(base_args, linux_families, windows_families): if is_schedule: # Always build and run full tests on scheduled runs. enable_build_jobs = True - test_type = "full" - test_type_reason = "scheduled run triggers full tests" + test_type = "nightly" + test_type_reason = "scheduled run triggers nightly tests" elif is_workflow_dispatch: # Always build and conditionally run full tests for workflow dispatch. enable_build_jobs = True @@ -692,6 +692,18 @@ def main(base_args, linux_families, windows_families): ): matrix_row["sanity_check_only_for_family"] = True + # If a test filter label is included, we set the "test_type" to the designated filter + if pr_labels and any("test_filter:" in label for label in pr_labels): + for label in pr_labels: + if "test_filter:" in label: + _, filter_type = label.split(":") + # If the filter type is not recognized, we ignore the label and keep the default test type + if filter_type not in ["smoke", "standard", "nightly", "full"]: + continue + test_type = filter_type + test_type_reason = f"test filter label specified: {label}" + break + print(f"test_type decision: '{test_type}' (reason: {test_type_reason})") # Format variants for summary - handle both regular and multi-arch modes diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index ce78ced889e..96af8d2f10a 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -1,18 +1,19 @@ # Copyright Advanced Micro Devices, Inc. # SPDX-License-Identifier: MIT +from contextlib import redirect_stdout, redirect_stderr +import io import json from pathlib import Path import os import sys import unittest -from unittest.mock import patch +from unittest.mock import MagicMock, patch sys.path.insert(0, os.fspath(Path(__file__).parent.parent)) # Add tests directory to path for extended_tests imports sys.path.insert(0, str(Path(__file__).resolve().parents[3] / "tests")) import configure_ci -from extended_tests.benchmark.benchmark_test_matrix import benchmark_matrix class ConfigureCITest(unittest.TestCase): @@ -267,6 +268,40 @@ def test_kernel_test_label_linux_pull_request_matrix_generator(self): ) self.assertEqual(linux_test_labels, []) + @patch("subprocess.run") + def test_filter_tests_from_pull_request(self, mock_run): + base_args = { + "pr_labels": '{"labels":[{"name":"test_filter:nightly"}]}', + "build_variant": "release", + "github_event_name": "pull_request", + "base_ref": "HEAD^", + } + mock_process = MagicMock() + mock_process.stdout = ".github/workflows/ci.yml\nsrc/some_code.cpp" + mock_run.return_value = mock_process + captured_out = io.StringIO() + captured_err = io.StringIO() + with redirect_stdout(captured_out), redirect_stderr(captured_err): + configure_ci.main(base_args, {}, {}) + self.assertIn('"test_type": "nightly"', captured_out.getvalue()) + + @patch("subprocess.run") + def test_invalid_filter_tests_from_pull_request(self, mock_run): + base_args = { + "pr_labels": '{"labels":[{"name":"test_filter:extended"}]}', + "build_variant": "release", + "github_event_name": "pull_request", + "base_ref": "HEAD^", + } + mock_process = MagicMock() + mock_process.stdout = ".github/workflows/ci.yml\nsrc/some_code.cpp" + mock_run.return_value = mock_process + captured_out = io.StringIO() + captured_err = io.StringIO() + with redirect_stdout(captured_out), redirect_stderr(captured_err): + configure_ci.main(base_args, {}, {}) + self.assertIn('"test_type": "smoke"', captured_out.getvalue()) + def test_skip_ci_label(self): base_args = { "pr_labels": '{"labels":[{"name":"skip-ci"},{"name":"test:hipblaslt"},{"name":"test:rocblas"},{"name":"gfx94X-linux"},{"name":"gfx110X-linux"},{"name":"gfx110X-windows"},{"name":"test_runner:oem"}]}', diff --git a/docs/development/ci_behavior_manipulation.md b/docs/development/ci_behavior_manipulation.md index e3454dd2198..aa23277dde9 100644 --- a/docs/development/ci_behavior_manipulation.md +++ b/docs/development/ci_behavior_manipulation.md @@ -17,6 +17,7 @@ However, if additional options are wanted, you can add a label to manipulate the - `gfx...`: A build and test (if a test machine is available) is added to the CI matrix for the specified gfx family. (ex: `gfx120X`, `gfx950`) - `test:...`: The full test will run only for the specified label and other labeled projects (ex: `test:rocthrust`, `test:hipblaslt`) - `test_runner:...`: The CI will run tests on only custom test machines (ex: `test_runner:oem`) +- `test_filter:...`: The CI will run tests based on the specified filter (ex: `test_filter:nightly`) ## Workflow dispatch behavior From 0ac45e376f1161fc32bc14948a492bf1e981c2cf Mon Sep 17 00:00:00 2001 From: geomin12 Date: Wed, 11 Mar 2026 13:47:28 -0700 Subject: [PATCH 2/6] Adding test filtering --- docs/development/ci_behavior_manipulation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development/ci_behavior_manipulation.md b/docs/development/ci_behavior_manipulation.md index aa23277dde9..a232c3337aa 100644 --- a/docs/development/ci_behavior_manipulation.md +++ b/docs/development/ci_behavior_manipulation.md @@ -17,7 +17,7 @@ However, if additional options are wanted, you can add a label to manipulate the - `gfx...`: A build and test (if a test machine is available) is added to the CI matrix for the specified gfx family. (ex: `gfx120X`, `gfx950`) - `test:...`: The full test will run only for the specified label and other labeled projects (ex: `test:rocthrust`, `test:hipblaslt`) - `test_runner:...`: The CI will run tests on only custom test machines (ex: `test_runner:oem`) -- `test_filter:...`: The CI will run tests based on the specified filter (ex: `test_filter:nightly`) +- `test_filter:...`: The CI will run tests based on the specified filter (ex: `test_filter:nightly`). [test_filtering.md](./test_filtering.md) has additional information on allowed test filters. ## Workflow dispatch behavior From be9a74fcc013eefdab26623ee738ce56588f77ba Mon Sep 17 00:00:00 2001 From: geomin12 Date: Thu, 12 Mar 2026 15:22:06 -0700 Subject: [PATCH 3/6] Adding switch to quick test for filtering --- .github/workflows/setup.yml | 2 +- .../github_actions/amdgpu_family_matrix.py | 2 +- build_tools/github_actions/configure_ci.py | 20 +++++++++---------- .../fetch_test_configurations.py | 4 ++-- .../print_test_reproduction_steps.py | 2 +- .../test_executable_scripts/README.md | 4 ++-- .../test_executable_scripts/test_amdsmi.py | 6 +++--- .../test_fusilliprovider.py | 8 ++++---- .../test_executable_scripts/test_hipblas.py | 4 ++-- .../test_executable_scripts/test_hipblaslt.py | 4 ++-- .../test_hipblasltprovider.py | 4 ++-- .../test_executable_scripts/test_hipcub.py | 8 ++++---- .../test_executable_scripts/test_hipfft.py | 4 ++-- .../test_executable_scripts/test_hipsparse.py | 2 +- .../test_hipsparselt.py | 4 ++-- .../test_executable_scripts/test_miopen.py | 12 +++++------ .../test_miopenprovider.py | 4 ++-- .../test_executable_scripts/test_rocblas.py | 6 +++--- .../test_executable_scripts/test_rocfft.py | 4 ++-- .../test_executable_scripts/test_rocprim.py | 8 ++++---- .../test_rocprofiler_compute.py | 10 +++++----- .../test_executable_scripts/test_rocrand.py | 8 ++++---- .../test_executable_scripts/test_rocroller.py | 6 +++--- .../test_executable_scripts/test_rocrtst.py | 8 ++++---- .../test_executable_scripts/test_rocsolver.py | 8 ++++---- .../test_executable_scripts/test_rocsparse.py | 4 ++-- .../test_executable_scripts/test_rocthrust.py | 8 ++++---- .../test_executable_scripts/test_rocwmma.py | 4 ++-- .../test_executable_scripts/test_runner.py | 6 +++--- .../github_actions/tests/configure_ci_test.py | 6 +++--- .../tests/fetch_test_configurations_test.py | 4 ++-- docs/development/ci_behavior_manipulation.md | 2 +- docs/development/test_filtering.md | 12 +++++------ tests/extended_tests/benchmark/README.md | 4 ++-- 34 files changed, 101 insertions(+), 101 deletions(-) diff --git a/.github/workflows/setup.yml b/.github/workflows/setup.yml index 3e7d5490c73..40fddba006a 100644 --- a/.github/workflows/setup.yml +++ b/.github/workflows/setup.yml @@ -27,7 +27,7 @@ on: description: Matrix variants to run on Windows. value: ${{ jobs.setup.outputs.windows_variants }} test_type: - description: The test type to run for component tests (i.e. smoke, full) + description: The test type to run for component tests (i.e. quick, full) value: ${{ jobs.setup.outputs.test_type }} windows_test_labels: description: ROCm projects to run Windows tests on. Optional filter. diff --git a/build_tools/github_actions/amdgpu_family_matrix.py b/build_tools/github_actions/amdgpu_family_matrix.py index 81f10eaf917..776c2682cf2 100644 --- a/build_tools/github_actions/amdgpu_family_matrix.py +++ b/build_tools/github_actions/amdgpu_family_matrix.py @@ -120,7 +120,7 @@ "family": "gfx1151", "fetch-gfx-targets": ["gfx1151"], "build_variants": ["release"], - # TODO(#3299): Re-enable smoke tests once capacity is available for Windows gfx1151 + # TODO(#3299): Re-enable quick tests once capacity is available for Windows gfx1151 "run-full-tests-only": True, }, }, diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index d7b69ff9a41..ae0e71afa57 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -38,7 +38,7 @@ * windows_amdgpu_families : List of valid Windows AMD GPU families to execute build and test jobs * windows_test_labels : List of test names to run on Windows, optionally filtered by PR labels. * enable_build_jobs: If true, builds will be enabled - * test_type: The type of test that component tests will run (i.e. smoke, full) + * test_type: The type of test that component tests will run (i.e. quick, full) Written to GITHUB_STEP_SUMMARY: * Human-readable summary for most contributors @@ -642,14 +642,14 @@ def main(base_args, linux_families, windows_families): ) print("") - test_type = "smoke" - test_type_reason = "default (smoke tests)" + test_type = "quick" + test_type_reason = "default (quick tests)" if is_schedule: # Always build and run full tests on scheduled runs. enable_build_jobs = True - test_type = "nightly" - test_type_reason = "scheduled run triggers nightly tests" + test_type = "comprehensive" + test_type_reason = "scheduled run triggers comprehensive tests" elif is_workflow_dispatch: # Always build and conditionally run full tests for workflow dispatch. enable_build_jobs = True @@ -668,7 +668,7 @@ def main(base_args, linux_families, windows_families): enable_build_jobs = is_ci_run_required(modified_paths) # If the modified path contains any git submodules, we want to run a full test suite. - # Otherwise, we just run smoke tests + # Otherwise, we just run quick tests submodule_paths = get_git_submodule_paths(repo_root=THEROCK_DIR) matching_submodule_paths = list(set(submodule_paths) & set(modified_paths)) if matching_submodule_paths: @@ -682,8 +682,8 @@ def main(base_args, linux_families, windows_families): test_type_reason = f"test label(s) specified: {combined_test_labels}" for matrix_row in linux_variants_output + windows_variants_output: - # If the "run-full-tests-only" flag is set for this family, we do not run tests if it is a smoke test type - if matrix_row.get("run-full-tests-only", False) and test_type == "smoke": + # If the "run-full-tests-only" flag is set for this family, we do not run tests if it is a quick test type + if matrix_row.get("run-full-tests-only", False) and test_type == "quick": matrix_row["test-runs-on"] = "" # For nightly_check_only_for_family architectures, we want to run only full tests during nightly (scheduled) run # Otherwise, we run sanity checks in all other scenarios (presubmit/postsubmit) @@ -696,9 +696,9 @@ def main(base_args, linux_families, windows_families): if pr_labels and any("test_filter:" in label for label in pr_labels): for label in pr_labels: if "test_filter:" in label: - _, filter_type = label.split(":") + filter_type = label.split(":")[1] # If the filter type is not recognized, we ignore the label and keep the default test type - if filter_type not in ["smoke", "standard", "nightly", "full"]: + if filter_type not in ["quick", "standard", "comprehensive", "full"]: continue test_type = filter_type test_type_reason = f"test filter label specified: {label}" diff --git a/build_tools/github_actions/fetch_test_configurations.py b/build_tools/github_actions/fetch_test_configurations.py index a62526fefa5..83d6783b368 100644 --- a/build_tools/github_actions/fetch_test_configurations.py +++ b/build_tools/github_actions/fetch_test_configurations.py @@ -535,9 +535,9 @@ def run(): job_config_data["shard_arr"] = [i + 1 for i in range(total_shards)] job_config_data["total_shards"] = total_shards - # If the test type is smoke tests, we only need one shard for the test job + # If the test type is quick tests, we only need one shard for the test job # Note: Benchmarks always use test_type="full" but have total_shards=1 anyway - if test_type == "smoke": + if test_type == "quick": job_config_data["total_shards"] = 1 job_config_data["shard_arr"] = [1] diff --git a/build_tools/github_actions/print_test_reproduction_steps.py b/build_tools/github_actions/print_test_reproduction_steps.py index 015d68c9803..45cc00da6e7 100644 --- a/build_tools/github_actions/print_test_reproduction_steps.py +++ b/build_tools/github_actions/print_test_reproduction_steps.py @@ -117,7 +117,7 @@ def print_reproduction_steps(args: argparse.Namespace) -> None: "--test-type", type=str, default="full", - help="Test type (e.g., full, smoke)", + help="Test type (e.g., full, quick)", ) parser.add_argument( "--container-image", diff --git a/build_tools/github_actions/test_executable_scripts/README.md b/build_tools/github_actions/test_executable_scripts/README.md index 391dabadff3..2ab9e99772f 100644 --- a/build_tools/github_actions/test_executable_scripts/README.md +++ b/build_tools/github_actions/test_executable_scripts/README.md @@ -9,7 +9,7 @@ ______________________________________________________________________ ## Overview 1. The script is invoked by the **Test component** workflow with env vars set (component name, GPU arch, test type, sharding). -1. The script expects the component under test to have a ctest based interface, with labels corresponding to test categories like quick, standard, comprehensive and full(which can be run for scenarios like smoke test, pre-commit etc) +1. The script expects the component under test to have a ctest based interface, with labels corresponding to test categories like quick, standard, comprehensive and full(which can be run for scenarios like quick test, pre-commit etc) 1. The component can opt to always exclude some tests or based on condition like OS and GPU where the test is getting run 1. The script discovers which **GPU-specific test suites** exist by running `ctest --print-labels` and parsing labels of the form `ex_gpu_{gpu_arch}`. 1. It builds and runs a **ctest** command with the right labels and options (category, parallelism, sharding, etc.). @@ -43,7 +43,7 @@ ______________________________________________________________________ Run `ctest --print-labels --test-dir {THEROCK_BIN_DIR}/{TEST_COMPONENT}`. Collect every label that starts with `ex_gpu_` and whose suffix starts with `gfx` (e.g. `ex_gpu_gfx110X` → `gfx110X`). This yields the set of **available GPU architectures** for which a label exists. These are the set of GPU's for which some test exclusions apply - i.e there are some tests which should not be run on these GPU models. The exp_gpu\_ labels with these gpu models points to the ctest entries where the tests are excluded. 1. **Choose category** - From `TEST_TYPE`: `smoke` → `quick`, else → `standard`. + From `TEST_TYPE`: `quick` → `full`, else → `standard`. 1. **Resolve GPU arch** Parse `AMDGPU_FAMILIES` for the first `gfx...` token (e.g. `gfx1151`). If missing or generic, the script will exclude all GPU-specific tests (`-LE ex_gpu`). 1. **Match GPU to suite** diff --git a/build_tools/github_actions/test_executable_scripts/test_amdsmi.py b/build_tools/github_actions/test_executable_scripts/test_amdsmi.py index 5a74704880a..97ec5930cee 100644 --- a/build_tools/github_actions/test_executable_scripts/test_amdsmi.py +++ b/build_tools/github_actions/test_executable_scripts/test_amdsmi.py @@ -52,11 +52,11 @@ # ----------------------------- # Test filtering # ----------------------------- -# If smoke mode is enabled, run minimal suite (only dynamic metric tests) +# If quick mode is enabled, run minimal suite (only dynamic metric tests) test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - logging.info("Running smoke tests only for amdsmitst") +if test_type == "quick": + logging.info("Running quick tests only for amdsmitst") test_filter = ["--gtest_filter=AmdSmiDynamicMetricTest.*"] else: # Full test mode: run whitelist and explicitly exclude known failing tests diff --git a/build_tools/github_actions/test_executable_scripts/test_fusilliprovider.py b/build_tools/github_actions/test_executable_scripts/test_fusilliprovider.py index 39e60fea189..6dcf2eb0ef3 100755 --- a/build_tools/github_actions/test_executable_scripts/test_fusilliprovider.py +++ b/build_tools/github_actions/test_executable_scripts/test_fusilliprovider.py @@ -30,8 +30,8 @@ # Determine test filter based on TEST_TYPE environment variable test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - # Exclude tests that start with "Full" during smoke tests +if test_type == "quick": + # Exclude tests that start with "Full" during quick tests environ_vars["GTEST_FILTER"] = "-Full*" # As a sanity check, verify libIREECompiler.so is available in the build artifacts. @@ -49,8 +49,8 @@ # Run the tests logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") -if test_type == "smoke": - logging.info(" TEST_TYPE=smoke: Excluding Full* tests via GTEST_FILTER") +if test_type == "quick": + logging.info(" TEST_TYPE=quick: Excluding Full* tests via GTEST_FILTER") subprocess.run( cmd, cwd=THEROCK_DIR, diff --git a/build_tools/github_actions/test_executable_scripts/test_hipblas.py b/build_tools/github_actions/test_executable_scripts/test_hipblas.py index 1db6a44bafc..891ae73e01b 100644 --- a/build_tools/github_actions/test_executable_scripts/test_hipblas.py +++ b/build_tools/github_actions/test_executable_scripts/test_hipblas.py @@ -42,10 +42,10 @@ f"{THEROCK_BIN_DIR}/hipblas-test", ] -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": +if test_type == "quick": cmd += [ "--yaml", f"{THEROCK_BIN_DIR}/hipblas_smoke.yaml", diff --git a/build_tools/github_actions/test_executable_scripts/test_hipblaslt.py b/build_tools/github_actions/test_executable_scripts/test_hipblaslt.py index 7cccca74bc7..80b219c0e24 100644 --- a/build_tools/github_actions/test_executable_scripts/test_hipblaslt.py +++ b/build_tools/github_actions/test_executable_scripts/test_hipblaslt.py @@ -32,7 +32,7 @@ environ_vars["HSA_XNACK"] = "1" environ_vars["OMP_NUM_THREADS"] = "1" -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") @@ -41,7 +41,7 @@ test_type = "quick" test_filter = [] -if test_type == "smoke": +if test_type == "quick": test_filter.append("--gtest_filter=*smoke*") elif test_type == "quick": test_filter.append("--gtest_filter=*quick*") diff --git a/build_tools/github_actions/test_executable_scripts/test_hipblasltprovider.py b/build_tools/github_actions/test_executable_scripts/test_hipblasltprovider.py index df465d07557..5273863fe76 100644 --- a/build_tools/github_actions/test_executable_scripts/test_hipblasltprovider.py +++ b/build_tools/github_actions/test_executable_scripts/test_hipblasltprovider.py @@ -28,8 +28,8 @@ environ_vars = os.environ.copy() test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - # Exclude tests that start with "Full" during smoke tests +if test_type == "quick": + # Exclude tests that start with "Full" during quick tests environ_vars["GTEST_FILTER"] = "-Full*" logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") diff --git a/build_tools/github_actions/test_executable_scripts/test_hipcub.py b/build_tools/github_actions/test_executable_scripts/test_hipcub.py index 6eefbc390f4..58c09fd21ab 100644 --- a/build_tools/github_actions/test_executable_scripts/test_hipcub.py +++ b/build_tools/github_actions/test_executable_scripts/test_hipcub.py @@ -14,7 +14,7 @@ logging.basicConfig(level=logging.INFO) -SMOKE_TESTS = [ +QUICK_TESTS = [ "*ShuffleTests/*.*", "*WarpStoreTest/*.*", "AdjacentDifference/*.*", @@ -107,12 +107,12 @@ "300", ] -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite environ_vars = os.environ.copy() test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - environ_vars["GTEST_FILTER"] = ":".join(SMOKE_TESTS) +if test_type == "quick": + environ_vars["GTEST_FILTER"] = ":".join(QUICK_TESTS) logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") subprocess.run(cmd, cwd=THEROCK_DIR, check=True, env=environ_vars) diff --git a/build_tools/github_actions/test_executable_scripts/test_hipfft.py b/build_tools/github_actions/test_executable_scripts/test_hipfft.py index cfeec7557d7..8b8ab0a40cd 100644 --- a/build_tools/github_actions/test_executable_scripts/test_hipfft.py +++ b/build_tools/github_actions/test_executable_scripts/test_hipfft.py @@ -21,10 +21,10 @@ environ_vars["GTEST_SHARD_INDEX"] = str(int(SHARD_INDEX) - 1) environ_vars["GTEST_TOTAL_SHARDS"] = str(TOTAL_SHARDS) -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": +if test_type == "quick": test_filter = ["--smoketest"] else: # "--test_prob" is the probability that a given test will run. diff --git a/build_tools/github_actions/test_executable_scripts/test_hipsparse.py b/build_tools/github_actions/test_executable_scripts/test_hipsparse.py index 1d4dbb059ad..cb51049b4bb 100644 --- a/build_tools/github_actions/test_executable_scripts/test_hipsparse.py +++ b/build_tools/github_actions/test_executable_scripts/test_hipsparse.py @@ -29,7 +29,7 @@ cmd = [f"{THEROCK_BIN_DIR}/hipsparse-test"] test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": +if test_type == "quick": cmd.append( "--gtest_filter=*spmv*:*spsv*:*spsm*:*spmm*:*csric0*:*csrilu0*:-known_bug*" ) diff --git a/build_tools/github_actions/test_executable_scripts/test_hipsparselt.py b/build_tools/github_actions/test_executable_scripts/test_hipsparselt.py index 4397d6488ff..a7e77f746a9 100644 --- a/build_tools/github_actions/test_executable_scripts/test_hipsparselt.py +++ b/build_tools/github_actions/test_executable_scripts/test_hipsparselt.py @@ -22,12 +22,12 @@ environ_vars["GTEST_SHARD_INDEX"] = str(int(SHARD_INDEX) - 1) environ_vars["GTEST_TOTAL_SHARDS"] = str(TOTAL_SHARDS) -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") test_filter = [] -if test_type == "smoke": +if test_type == "quick": test_filter.append("--gtest_filter=*smoke*") elif test_type == "full": test_filter.append("--gtest_filter=*quick*") diff --git a/build_tools/github_actions/test_executable_scripts/test_miopen.py b/build_tools/github_actions/test_executable_scripts/test_miopen.py index e6334db9b09..cfe94549a1f 100644 --- a/build_tools/github_actions/test_executable_scripts/test_miopen.py +++ b/build_tools/github_actions/test_executable_scripts/test_miopen.py @@ -240,8 +240,8 @@ #################################################### -# Creating a smoke test filter -smoke_filter = [ +# Creating a quick test filter +quick_filter = [ # Batch norm FWD smoke tests "Smoke/GPU_BNCKFWDTrainLarge2D_FP16*", "Smoke/GPU_BNOCLFWDTrainLarge2D_FP16*", @@ -256,16 +256,16 @@ # TODO(rocm-libraries#2266): re-enable test for gfx950-dcgpu if AMDGPU_FAMILIES != "gfx950-dcgpu": - smoke_filter.append("*DBSync*") + quick_filter.append("*DBSync*") positive_filter.append("*DBSync*") #################################################### -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - test_filter = "--gtest_filter=" + ":".join(smoke_filter) +if test_type == "quick": + test_filter = "--gtest_filter=" + ":".join(quick_filter) else: test_filter = ( "--gtest_filter=" + ":".join(positive_filter) + "-" + ":".join(negative_filter) diff --git a/build_tools/github_actions/test_executable_scripts/test_miopenprovider.py b/build_tools/github_actions/test_executable_scripts/test_miopenprovider.py index 43f492de5f4..1685251da46 100644 --- a/build_tools/github_actions/test_executable_scripts/test_miopenprovider.py +++ b/build_tools/github_actions/test_executable_scripts/test_miopenprovider.py @@ -47,8 +47,8 @@ environ_vars = os.environ.copy() test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - # Exclude tests that start with "Full" during smoke tests +if test_type == "quick": + # Exclude tests that start with "Full" during quick tests environ_vars["GTEST_FILTER"] = "-Full*" logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") diff --git a/build_tools/github_actions/test_executable_scripts/test_rocblas.py b/build_tools/github_actions/test_executable_scripts/test_rocblas.py index 37e996c968c..ee94528db02 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocblas.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocblas.py @@ -29,13 +29,13 @@ logging.basicConfig(level=logging.INFO) -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": +if test_type == "quick": test_filter = ["--yaml", f"{THEROCK_BIN_DIR}/rocblas_smoke.yaml"] else: - # only running smoke tests due to openBLAS issue: https://github.com/ROCm/TheRock/issues/1605 + # only running quick tests due to openBLAS issue: https://github.com/ROCm/TheRock/issues/1605 test_filter = ["--yaml", f"{THEROCK_BIN_DIR}/rocblas_smoke.yaml"] cmd = [f"{THEROCK_BIN_DIR}/rocblas-test"] + test_filter diff --git a/build_tools/github_actions/test_executable_scripts/test_rocfft.py b/build_tools/github_actions/test_executable_scripts/test_rocfft.py index ab0d4bd1da8..3e5c726daa9 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocfft.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocfft.py @@ -21,10 +21,10 @@ environ_vars["GTEST_SHARD_INDEX"] = str(int(SHARD_INDEX) - 1) environ_vars["GTEST_TOTAL_SHARDS"] = str(TOTAL_SHARDS) -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": +if test_type == "quick": test_filter = ["--smoketest"] else: # "--test_prob" is the probability that a given test will run. diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprim.py b/build_tools/github_actions/test_executable_scripts/test_rocprim.py index 3a080e972f1..312b3da7afc 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprim.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprim.py @@ -36,7 +36,7 @@ }, } -SMOKE_TESTS = [ +QUICK_TESTS = [ "*ArgIndexIterator", "*BasicTests.GetVersion", "*BatchMemcpyTests/*", @@ -122,12 +122,12 @@ ignored_tests = TEST_TO_IGNORE[AMDGPU_FAMILIES][os_type] cmd.extend(["--exclude-regex", "|".join(ignored_tests)]) -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite environ_vars = os.environ.copy() test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - environ_vars["GTEST_FILTER"] = ":".join(SMOKE_TESTS) +if test_type == "quick": + environ_vars["GTEST_FILTER"] = ":".join(QUICK_TESTS) logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") diff --git a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py index 2de4f6af4f5..be272619898 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocprofiler_compute.py @@ -19,8 +19,8 @@ "test_profile_live_attach_detach", ] -# Smoke Tests -SMOKE_TESTS = [ +# quick Tests +QUICK_TESTS = [ "test_autogen_config", "test_utils", "test_num_xcds_cli_output", @@ -76,12 +76,12 @@ def execute_tests(): f"{shard_index},,{total_shards}", ] - # If smoke tests are enabled, we run smoke tests only. + # If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") - if test_type == "smoke": + if test_type == "quick": cmd.append("--tests-regex") - cmd.append("|".join(SMOKE_TESTS)) + cmd.append("|".join(QUICK_TESTS)) logging.info(f"++ Exec [{THEROCK_PATH}]$ {shlex.join(cmd)}") subprocess.run( diff --git a/build_tools/github_actions/test_executable_scripts/test_rocrand.py b/build_tools/github_actions/test_executable_scripts/test_rocrand.py index 962a0d84d02..83263c05cf8 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocrand.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocrand.py @@ -13,7 +13,7 @@ logging.basicConfig(level=logging.INFO) -SMOKE_TESTS = [ +QUICK_TESTS = [ "*basic_tests*", "*config_dispatch_tests.*", "*cpp_utils_tests.*", @@ -95,12 +95,12 @@ "until-pass:3", ] -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite environ_vars = os.environ.copy() test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - environ_vars["GTEST_FILTER"] = ":".join(SMOKE_TESTS) +if test_type == "quick": + environ_vars["GTEST_FILTER"] = ":".join(QUICK_TESTS) logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") diff --git a/build_tools/github_actions/test_executable_scripts/test_rocroller.py b/build_tools/github_actions/test_executable_scripts/test_rocroller.py index 73f89a52d68..7494532e3ca 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocroller.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocroller.py @@ -70,9 +70,9 @@ # TEST_TYPE → gtest filter TEST_TYPE = os.getenv("TEST_TYPE", "full").lower() test_filter_arg = None -if TEST_TYPE == "smoke": +if TEST_TYPE == "quick": # keep this subset (TODO: add more tests) - smoke_tests = [ + quick_tests = [ "ErrorFixtureDeathTest.*", "ArgumentLoaderTest.*", "AssemblerTest.*", @@ -80,7 +80,7 @@ "CommandTest.*", "ComponentTest.*", ] - test_filter_arg = "--gtest_filter=" + ":".join(smoke_tests) + test_filter_arg = "--gtest_filter=" + ":".join(quick_tests) elif TEST_TYPE == "quick": test_filter_arg = "--gtest_filter=*quick*" diff --git a/build_tools/github_actions/test_executable_scripts/test_rocrtst.py b/build_tools/github_actions/test_executable_scripts/test_rocrtst.py index 251d89de634..c458b2f5c6b 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocrtst.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocrtst.py @@ -32,8 +32,8 @@ "-rocrtstFunc.Memory_Max_Mem", ] -# If smoke tests are enabled, run smoke tests only. Otherwise, run the full suite. -SMOKE_TESTS = [ +# If quick tests are enabled, run quick tests only. Otherwise, run the full suite. +QUICK_TESTS = [ "rocrtst.Test_Example", "rocrtstFunc.MemoryAccessTests", "rocrtstFunc.GroupMemoryAllocationTest", @@ -53,8 +53,8 @@ test_type = os.getenv("TEST_TYPE", "full") exclude_filter = ":".join(EXCLUDED_TESTS) -if test_type == "smoke": - environ_vars["GTEST_FILTER"] = ":".join(SMOKE_TESTS) + ":" + exclude_filter +if test_type == "quick": + environ_vars["GTEST_FILTER"] = ":".join(QUICK_TESTS) + ":" + exclude_filter else: environ_vars["GTEST_FILTER"] = exclude_filter diff --git a/build_tools/github_actions/test_executable_scripts/test_rocsolver.py b/build_tools/github_actions/test_executable_scripts/test_rocsolver.py index 31a931801f6..56872fd9dae 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocsolver.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocsolver.py @@ -26,12 +26,12 @@ f"{THEROCK_BIN_DIR}/rocsolver-test", ] -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite # Test filter patterns retrieved from https://github.com/ROCm/rocm-libraries/blob/a18b17eef6c24bcd4bcf8dd6a0e36325cbcd11a7/projects/rocsolver/rtest.xml test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - smoke_tests = [ +if test_type == "quick": + quick_tests = [ "checkin*BDSQR*", "checkin*STEBZ*", "checkin*STEIN*", @@ -50,7 +50,7 @@ "checkin*REFACTLU*", "checkin*REFACTCHOL*", ] - cmd.extend([f"--gtest_filter={':'.join(smoke_tests)}-*LARFB*:*known_bug*"]) + cmd.extend([f"--gtest_filter={':'.join(quick_tests)}-*LARFB*:*known_bug*"]) else: cmd.extend( ["--gtest_filter=checkin*-*known_bug*:checkin_lapack/SYGVDX_INPLACE.__float/41"] diff --git a/build_tools/github_actions/test_executable_scripts/test_rocsparse.py b/build_tools/github_actions/test_executable_scripts/test_rocsparse.py index 28bc64d55e3..5299099ae74 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocsparse.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocsparse.py @@ -22,10 +22,10 @@ environ_vars["GTEST_SHARD_INDEX"] = str(int(SHARD_INDEX) - 1) environ_vars["GTEST_TOTAL_SHARDS"] = str(TOTAL_SHARDS) -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": +if test_type == "quick": test_filter = [ "--yaml", f"{THEROCK_DIR}/build/share/rocsparse/test/rocsparse_smoke.yaml", diff --git a/build_tools/github_actions/test_executable_scripts/test_rocthrust.py b/build_tools/github_actions/test_executable_scripts/test_rocthrust.py index 7f2e183c53f..1944dab6b6c 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocthrust.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocthrust.py @@ -15,7 +15,7 @@ logging.basicConfig(level=logging.INFO) -SMOKE_TESTS = [ +QUICK_TESTS = [ "AllocatorTests.*", "AsyncExclusiveScan*", "AsyncInclusiveScan*", @@ -138,12 +138,12 @@ "300", ] -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite environ_vars = os.environ.copy() test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - environ_vars["GTEST_FILTER"] = ":".join(SMOKE_TESTS) +if test_type == "quick": + environ_vars["GTEST_FILTER"] = ":".join(QUICK_TESTS) logging.info(f"++ Exec [{THEROCK_DIR}]$ {shlex.join(cmd)}") diff --git a/build_tools/github_actions/test_executable_scripts/test_rocwmma.py b/build_tools/github_actions/test_executable_scripts/test_rocwmma.py index 4c108e561f7..accfb9ed1e7 100644 --- a/build_tools/github_actions/test_executable_scripts/test_rocwmma.py +++ b/build_tools/github_actions/test_executable_scripts/test_rocwmma.py @@ -31,7 +31,7 @@ logging.basicConfig(level=logging.INFO) -# If smoke tests are enabled, we run smoke tests only. +# If quick tests are enabled, we run quick tests only. # Otherwise, we run the normal test suite test_type = os.getenv("TEST_TYPE", "full") @@ -40,7 +40,7 @@ test_subdir = "" timeout = "3600" -if test_type == "smoke": +if test_type == "quick": # The emulator regression tests are very fast. # If we need something even faster we can use "/smoke" here. test_subdir = "/regression" diff --git a/build_tools/github_actions/test_executable_scripts/test_runner.py b/build_tools/github_actions/test_executable_scripts/test_runner.py index 6271cbb9de0..9e3f4b2958f 100644 --- a/build_tools/github_actions/test_executable_scripts/test_runner.py +++ b/build_tools/github_actions/test_executable_scripts/test_runner.py @@ -8,7 +8,7 @@ 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: "smoke" runs tests with "quick" category, otherwise runs "standard" category +TEST_TYPE: "quick" runs tests with "quick" category, otherwise runs "standard" category 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. @@ -29,7 +29,7 @@ THEROCK_BIN_DIR = os.getenv("THEROCK_BIN_DIR") SCRIPT_DIR = Path(__file__).resolve().parent THEROCK_DIR = SCRIPT_DIR.parent.parent.parent -TEST_TYPE = os.getenv("TEST_TYPE", "smoke") +TEST_TYPE = os.getenv("TEST_TYPE", "quick") AMDGPU_FAMILIES = os.getenv("AMDGPU_FAMILIES") # Map job names to actual test directory names @@ -197,7 +197,7 @@ 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() == "smoke": + if TEST_TYPE and TEST_TYPE.lower() == "quick": category = "quick" else: category = "standard" diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index 96af8d2f10a..9f7ea470d13 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -271,7 +271,7 @@ def test_kernel_test_label_linux_pull_request_matrix_generator(self): @patch("subprocess.run") def test_filter_tests_from_pull_request(self, mock_run): base_args = { - "pr_labels": '{"labels":[{"name":"test_filter:nightly"}]}', + "pr_labels": '{"labels":[{"name":"test_filter:comprehensive"}]}', "build_variant": "release", "github_event_name": "pull_request", "base_ref": "HEAD^", @@ -283,7 +283,7 @@ def test_filter_tests_from_pull_request(self, mock_run): captured_err = io.StringIO() with redirect_stdout(captured_out), redirect_stderr(captured_err): configure_ci.main(base_args, {}, {}) - self.assertIn('"test_type": "nightly"', captured_out.getvalue()) + self.assertIn('"test_type": "comprehensive"', captured_out.getvalue()) @patch("subprocess.run") def test_invalid_filter_tests_from_pull_request(self, mock_run): @@ -300,7 +300,7 @@ def test_invalid_filter_tests_from_pull_request(self, mock_run): captured_err = io.StringIO() with redirect_stdout(captured_out), redirect_stderr(captured_err): configure_ci.main(base_args, {}, {}) - self.assertIn('"test_type": "smoke"', captured_out.getvalue()) + self.assertIn('"test_type": "quick"', captured_out.getvalue()) def test_skip_ci_label(self): base_args = { diff --git a/build_tools/github_actions/tests/fetch_test_configurations_test.py b/build_tools/github_actions/tests/fetch_test_configurations_test.py index 7071d317b85..052ffaf5f66 100644 --- a/build_tools/github_actions/tests/fetch_test_configurations_test.py +++ b/build_tools/github_actions/tests/fetch_test_configurations_test.py @@ -108,8 +108,8 @@ def test_full_test_uses_all_shards(self): self.assertEqual(hipblaslt["total_shards"], 6) self.assertEqual(hipblaslt["shard_arr"], [1, 2, 3, 4, 5, 6]) - def test_smoke_test_forces_single_shard(self): - os.environ["TEST_TYPE"] = "smoke" + def test_quick_test_forces_single_shard(self): + os.environ["TEST_TYPE"] = "quick" fetch_test_configurations.run() components = self._get_components() diff --git a/docs/development/ci_behavior_manipulation.md b/docs/development/ci_behavior_manipulation.md index a232c3337aa..a5cd4bd8365 100644 --- a/docs/development/ci_behavior_manipulation.md +++ b/docs/development/ci_behavior_manipulation.md @@ -17,7 +17,7 @@ However, if additional options are wanted, you can add a label to manipulate the - `gfx...`: A build and test (if a test machine is available) is added to the CI matrix for the specified gfx family. (ex: `gfx120X`, `gfx950`) - `test:...`: The full test will run only for the specified label and other labeled projects (ex: `test:rocthrust`, `test:hipblaslt`) - `test_runner:...`: The CI will run tests on only custom test machines (ex: `test_runner:oem`) -- `test_filter:...`: The CI will run tests based on the specified filter (ex: `test_filter:nightly`). [test_filtering.md](./test_filtering.md) has additional information on allowed test filters. +- `test_filter:...`: The CI will run tests based on the specified filter (ex: `test_filter:comprehensive`). [test_filtering.md](./test_filtering.md) has additional information on allowed test filters. ## Workflow dispatch behavior diff --git a/docs/development/test_filtering.md b/docs/development/test_filtering.md index df79686ed90..55218da8d14 100644 --- a/docs/development/test_filtering.md +++ b/docs/development/test_filtering.md @@ -4,7 +4,7 @@ ## Types of filters -- smoke: A "sanity check" to ensure the system is fundamentally working +- quick: A "sanity check" to ensure the system is fundamentally working - Runs on: pull requests (if ROCm non-component related change), push to main branch - Characteristics: Shallow validation, focus on critical paths, component runs properly - Execution time: < 5 min @@ -39,21 +39,21 @@ For gtest executables, using `gtest_filter` is sufficient ``` -./gtest-executable --gtest_filter=*smoke* +./gtest-executable --gtest_filter=*quick* ./gtest-executable --gtest_filter=*nightly* ``` For ctest, using the `GTEST_FILTER` environment variable with ctest executables will be sufficient like below: ``` -SMOKE_TESTS = [ - "*smoke_tests*", +QUICK_TESTS = [ + "*quick_tests*", "*basic_tests*" ] environ_vars = os.environ.copy() test_type = os.getenv("TEST_TYPE", "full") -if test_type == "smoke": - environ_vars["GTEST_FILTER"] = ":".join(SMOKE_TESTS) +if test_type == "quick": + environ_vars["GTEST_FILTER"] = ":".join(QUICK_TESTS) ``` ## Additional information diff --git a/tests/extended_tests/benchmark/README.md b/tests/extended_tests/benchmark/README.md index f13c4aa8bf7..0e544b27f20 100644 --- a/tests/extended_tests/benchmark/README.md +++ b/tests/extended_tests/benchmark/README.md @@ -66,9 +66,9 @@ Benchmark tests run **only on nightly CI builds** to save time and resources on | Workflow Trigger | Benchmark Tests | Regular Tests | | -------------------------- | ------------------------------ | ---------------------- | -| **Pull Request (PR)** | Skipped | Run (smoke: 1 shard) | +| **Pull Request (PR)** | Skipped | Run (quick: 1 shard) | | **Nightly CI (scheduled)** | Run (in parallel, always full) | Run (full: all shards) | -| **Push to main** | Skipped | Run (smoke: 1 shard) | +| **Push to main** | Skipped | Run (quick: 1 shard) | | **Manual workflow** | Optional | Optional | **Note:** Benchmarks always run with `total_shards=1` and do not use `test_type` or `test_labels` filtering. From 77d8414ed726cbf8ba3e64434172ac4b6f103e15 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Thu, 12 Mar 2026 15:27:03 -0700 Subject: [PATCH 4/6] fix pre-commit --- build_tools/github_actions/configure_ci.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index e3964afaf4a..54c0feca143 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -707,7 +707,12 @@ def main(base_args, linux_families, windows_families): if "test_filter:" in label: filter_type = label.split(":")[1] # If the filter type is not recognized, we ignore the label and keep the default test type - if filter_type not in ["quick", "standard", "comprehensive", "full"]: + if filter_type not in [ + "quick", + "standard", + "comprehensive", + "full", + ]: continue test_type = filter_type test_type_reason = f"test filter label specified: {label}" From 7b4267f635fd587d0c9a450213ca826af6339079 Mon Sep 17 00:00:00 2001 From: geomin12 Date: Mon, 16 Mar 2026 10:02:03 -0700 Subject: [PATCH 5/6] adding unit tests --- build_tools/github_actions/configure_ci.py | 1 + .../github_actions/tests/configure_ci_test.py | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/build_tools/github_actions/configure_ci.py b/build_tools/github_actions/configure_ci.py index 54c0feca143..0f48808f4f5 100755 --- a/build_tools/github_actions/configure_ci.py +++ b/build_tools/github_actions/configure_ci.py @@ -604,6 +604,7 @@ def main(base_args, linux_families, windows_families): print(f" is_schedule: {is_schedule}") print(f" linux_use_prebuilt_artifacts: {linux_use_prebuilt_artifacts}") print(f" windows_use_prebuilt_artifacts: {windows_use_prebuilt_artifacts}") + pr_labels = None if is_pull_request: pr_labels = get_pr_labels(base_args) print(f" pr_labels: {pr_labels}") diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index 9f7ea470d13..13d78b816a5 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -302,6 +302,44 @@ def test_invalid_filter_tests_from_pull_request(self, mock_run): configure_ci.main(base_args, {}, {}) self.assertIn('"test_type": "quick"', captured_out.getvalue()) + @patch("subprocess.run") + def test_valid_main_push_ci_run(self, mock_run): + base_args = { + "build_variant": "release", + "github_event_name": "push", + "base_ref": "HEAD^", + } + mock_process = MagicMock() + mock_process.stdout = ".github/workflows/ci.yml" + mock_run.return_value = mock_process + configure_ci.main(base_args, {}, {}) + + @patch("subprocess.run") + def test_valid_schedule_Ci_run(self, mock_run): + base_args = { + "build_variant": "release", + "github_event_name": "schedule", + "base_ref": "HEAD^", + } + mock_process = MagicMock() + mock_process.stdout = ".github/workflows/ci.yml" + mock_run.return_value = mock_process + configure_ci.main(base_args, {}, {}) + + @patch("subprocess.run") + def test_valid_workflow_dispatch_ci_run(self, mock_run): + base_args = { + "build_variant": "release", + "github_event_name": "workflow_dispatch", + "base_ref": "HEAD^", + } + mock_process = MagicMock() + mock_process.stdout = ".github/workflows/ci.yml" + mock_run.return_value = mock_process + configure_ci.main( + base_args, {"amdgpu_families": "gfx94X"}, {"amdgpu_families": "gfx110X"} + ) + def test_skip_ci_label(self): base_args = { "pr_labels": '{"labels":[{"name":"skip-ci"},{"name":"test:hipblaslt"},{"name":"test:rocblas"},{"name":"gfx94X-linux"},{"name":"gfx110X-linux"},{"name":"gfx110X-windows"},{"name":"test_runner:oem"}]}', From 117916ce25287ac0db454430b60a4b741f23711d Mon Sep 17 00:00:00 2001 From: geomin12 Date: Mon, 16 Mar 2026 11:59:32 -0700 Subject: [PATCH 6/6] more test cov --- build_tools/github_actions/tests/configure_ci_test.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build_tools/github_actions/tests/configure_ci_test.py b/build_tools/github_actions/tests/configure_ci_test.py index 2eac2264325..0c4dcceafb0 100644 --- a/build_tools/github_actions/tests/configure_ci_test.py +++ b/build_tools/github_actions/tests/configure_ci_test.py @@ -315,7 +315,7 @@ def test_valid_main_push_ci_run(self, mock_run): configure_ci.main(base_args, {}, {}) @patch("subprocess.run") - def test_valid_schedule_Ci_run(self, mock_run): + def test_valid_schedule_ci_run(self, mock_run): base_args = { "build_variant": "release", "github_event_name": "schedule", @@ -324,7 +324,11 @@ def test_valid_schedule_Ci_run(self, mock_run): mock_process = MagicMock() mock_process.stdout = ".github/workflows/ci.yml" mock_run.return_value = mock_process - configure_ci.main(base_args, {}, {}) + captured_out = io.StringIO() + captured_err = io.StringIO() + with redirect_stdout(captured_out), redirect_stderr(captured_err): + configure_ci.main(base_args, {}, {}) + self.assertIn('"test_type": "comprehensive"', captured_out.getvalue()) @patch("subprocess.run") def test_valid_workflow_dispatch_ci_run(self, mock_run):