Skip to content

Commit

Permalink
added version specific args to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LeFrosch committed Aug 22, 2024
1 parent efe9535 commit 4b01dd2
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions clwb/test_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4b01dd2

Please sign in to comment.