mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
load("@rules_java//java:defs.bzl", "java_binary")
|
|
|
|
def wpilib_java_junit5_test(
|
|
name,
|
|
deps = [],
|
|
runtime_deps = [],
|
|
args = [],
|
|
tags = [],
|
|
package = "edu",
|
|
**kwargs):
|
|
"""
|
|
Convenience helper to make a junit5 test
|
|
"""
|
|
junit_deps = [
|
|
"@maven//:org_junit_jupiter_junit_jupiter_api",
|
|
"@maven//:org_junit_jupiter_junit_jupiter_params",
|
|
"@maven//:org_junit_jupiter_junit_jupiter_engine",
|
|
]
|
|
|
|
junit_runtime_deps = [
|
|
"@maven//:org_junit_platform_junit_platform_console",
|
|
]
|
|
|
|
# TODO - replace with java_test once shared libraries are hooked up.
|
|
java_binary(
|
|
name = name,
|
|
deps = deps + junit_deps,
|
|
runtime_deps = runtime_deps + junit_runtime_deps,
|
|
args = args + ["--select-package", package],
|
|
main_class = "org.junit.platform.console.ConsoleLauncher",
|
|
use_testrunner = False,
|
|
testonly = True,
|
|
tags = tags + ["no-roborio", "no-bionic", "no-raspbian", "allwpilib-build-java", "no-asan", "no-tsan", "no-ubsan"],
|
|
**kwargs
|
|
)
|