Skip to content

Commit 5d0957f

Browse files
authored
[bazel] Allow overriding py_test rule for lit_test (#119460)
This allows replacing this implementation with another one, such as the one from aspect_rules_py
1 parent bedbaff commit 5d0957f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
"""Rules for running lit tests."""
55

66
load("@bazel_skylib//lib:paths.bzl", "paths")
7-
load("@rules_python//python:defs.bzl", "py_test")
7+
load("@rules_python//python:defs.bzl", _py_test = "py_test")
88

99
def lit_test(
1010
name,
1111
srcs,
1212
args = None,
1313
data = None,
1414
deps = None,
15+
py_test = _py_test,
1516
**kwargs):
1617
"""Runs a single test file with LLVM's lit tool.
1718
@@ -22,6 +23,8 @@ def lit_test(
2223
Note that `-v` and the 'srcs' paths are added automatically.
2324
data: label list. Additional data dependencies of the test.
2425
Note that 'srcs' targets are added automatically.
26+
deps: label list. List of targets the test depends on.
27+
py_test: function. The py_test rule to use for the underlying test.
2528
**kwargs: additional keyword arguments.
2629
2730
See https://llvm.org/docs/CommandGuide/lit.html for details on lit.

0 commit comments

Comments
 (0)