diff --git a/clwb/test_defs.bzl b/clwb/test_defs.bzl index 1ae79722b1e..53b2deada1d 100644 --- a/clwb/test_defs.bzl +++ b/clwb/test_defs.bzl @@ -10,6 +10,14 @@ load( ) load("@bazel_binaries//:defs.bzl", "bazel_binaries") +# version specific flags can be removed if version is dropped in MODULE.bazel +version_specific_args = { + "5.4.1": { + # mac CI runners ship invalid flags in system rc file + "startup_options": "--nosystem_rc", + }, +} + def clwb_integration_test(name, project, srcs, deps = []): runner = name + "_runner" @@ -38,19 +46,20 @@ def clwb_integration_test(name, project, srcs, deps = []): ], ) - bazel_integration_tests( - name = name, - tags = [], - bazel_versions = bazel_binaries.versions.all, - test_runner = ":" + runner, - workspace_path = "tests/projects/" + project, - # disables automatic conversion of bazel target names to absolut windows paths by msys - env = {"MSYS_NO_PATHCONV": "true"}, - # inherit bash shell and visual studio path from host for windows - additional_env_inherit = ["BAZEL_SH", "BAZEL_VC"], - # mac CI runners ship invalid flags in system rc file - startup_options = "--nosystem_rc", - ) + for version in bazel_binaries.versions.all: + bazel_integration_test( + name = integration_test_utils.bazel_integration_test_name(name, version), + tags = [], + bazel_version = version, + test_runner = ":" + runner, + workspace_path = "tests/projects/" + project, + # disables automatic conversion of bazel target names to absolut windows paths by msys + env = {"MSYS_NO_PATHCONV": "true"}, + # inherit bash shell and visual studio path from host for windows + additional_env_inherit = ["BAZEL_SH", "BAZEL_VC"], + # add version specific arguments, since some older versions cannot handle newer flags + **version_specific_args.get(version, {}), + ) native.test_suite( name = name,