Skip to content

Commit

Permalink
[bazel] Allow overriding py_test rule for lit_test (llvm#119460)
Browse files Browse the repository at this point in the history
This allows replacing this implementation with another one, such as the
one from aspect_rules_py
  • Loading branch information
keith authored Dec 10, 2024
1 parent bedbaff commit 5d0957f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion utils/bazel/llvm-project-overlay/llvm/lit_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
"""Rules for running lit tests."""

load("@bazel_skylib//lib:paths.bzl", "paths")
load("@rules_python//python:defs.bzl", "py_test")
load("@rules_python//python:defs.bzl", _py_test = "py_test")

def lit_test(
name,
srcs,
args = None,
data = None,
deps = None,
py_test = _py_test,
**kwargs):
"""Runs a single test file with LLVM's lit tool.
Expand All @@ -22,6 +23,8 @@ def lit_test(
Note that `-v` and the 'srcs' paths are added automatically.
data: label list. Additional data dependencies of the test.
Note that 'srcs' targets are added automatically.
deps: label list. List of targets the test depends on.
py_test: function. The py_test rule to use for the underlying test.
**kwargs: additional keyword arguments.
See https://llvm.org/docs/CommandGuide/lit.html for details on lit.
Expand Down

0 comments on commit 5d0957f

Please sign in to comment.