mirror of
https://github.com/github/codeql.git
synced 2025-12-16 08:43:11 +01:00
Tests can be run with ``` bazel test //swift/codegen:tests ``` Coverage can be checked installing `pytest-cov` and running ``` pytest --cov=swift/codegen swift/codegen/test ```
32 lines
483 B
Python
32 lines
483 B
Python
py_binary(
|
|
name = "codegen",
|
|
srcs = glob([
|
|
"lib/*.py",
|
|
"*.py",
|
|
]),
|
|
)
|
|
|
|
py_library(
|
|
name = "test_utils",
|
|
testonly = True,
|
|
srcs = ["test/utils.py"],
|
|
deps = [":codegen"],
|
|
)
|
|
|
|
[
|
|
py_test(
|
|
name = src[len("test/"):-len(".py")],
|
|
size = "small",
|
|
srcs = [src],
|
|
deps = [
|
|
":codegen",
|
|
":test_utils",
|
|
],
|
|
)
|
|
for src in glob(["test/test_*.py"])
|
|
]
|
|
|
|
test_suite(
|
|
name = "tests",
|
|
)
|