Skip to content

Commit dd57975

Browse files
authored
lit_test : check if there is already a deps key in kwargs (#87290)
This change checks if there is already a `deps` key in `kwargs` and concatenate it to avoid multiple values for `deps` key argument. background: #87022 recently added explicit `deps` to the lit_test. This is causing StableHLO bazel build failures at https://github.com/openxla/stablehlo/actions/runs/8511888283/job/23312383380?pr=2147 Tested: local build run is successful
1 parent 6d0174e commit dd57975

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

utils/bazel/llvm-project-overlay/llvm/lit_test.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def lit_test(
1010
srcs,
1111
args = None,
1212
data = None,
13+
deps = None,
1314
**kwargs):
1415
"""Runs a single test file with LLVM's lit tool.
1516
@@ -27,6 +28,7 @@ def lit_test(
2728

2829
args = args or []
2930
data = data or []
31+
deps = deps or []
3032

3133
native.py_test(
3234
name = name,
@@ -35,7 +37,7 @@ def lit_test(
3537
args = args + ["-v"] + ["$(execpath %s)" % src for src in srcs],
3638
data = data + srcs,
3739
legacy_create_init = False,
38-
deps = [Label("//llvm:lit")],
40+
deps = deps + [Label("//llvm:lit")],
3941
**kwargs
4042
)
4143

0 commit comments

Comments
 (0)