Skip to content

[bazel] Allow overriding py_test rule for lit_test #119460

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading