2018-12-04 15:14:08 +00:00
|
|
|
load("//lib:unittest.bzl", "TOOLCHAIN_TYPE", "unittest_toolchain")
|
|
|
|
|
2019-01-14 21:00:11 +00:00
|
|
|
licenses(["notice"])
|
|
|
|
|
2018-12-04 15:14:08 +00:00
|
|
|
toolchain_type(
|
|
|
|
name = "toolchain_type",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
unittest_toolchain(
|
|
|
|
name = "cmd",
|
|
|
|
failure_templ = """@echo off
|
|
|
|
echo %s
|
|
|
|
exit /b 1
|
|
|
|
""",
|
|
|
|
file_ext = ".bat",
|
|
|
|
join_on = "\necho ",
|
|
|
|
success_templ = "@exit /b 0",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2019-01-18 21:55:49 +00:00
|
|
|
toolchain(
|
|
|
|
name = "cmd_toolchain",
|
|
|
|
exec_compatible_with = [
|
|
|
|
"@bazel_tools//platforms:windows",
|
|
|
|
],
|
|
|
|
toolchain = ":cmd",
|
|
|
|
toolchain_type = TOOLCHAIN_TYPE,
|
|
|
|
)
|
|
|
|
|
2018-12-04 15:14:08 +00:00
|
|
|
unittest_toolchain(
|
|
|
|
name = "bash",
|
|
|
|
failure_templ = """#!/bin/sh
|
|
|
|
cat <<'EOF'
|
|
|
|
%s
|
|
|
|
EOF
|
|
|
|
exit 1
|
|
|
|
""",
|
|
|
|
file_ext = ".sh",
|
|
|
|
join_on = "\n",
|
|
|
|
success_templ = "#!/bin/sh\nexit 0",
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
|
|
|
toolchain(
|
|
|
|
name = "bash_toolchain",
|
|
|
|
toolchain = ":bash",
|
|
|
|
toolchain_type = TOOLCHAIN_TYPE,
|
|
|
|
)
|
2019-01-16 22:00:03 +00:00
|
|
|
|
|
|
|
filegroup(
|
|
|
|
name = "test_deps",
|
|
|
|
testonly = True,
|
|
|
|
srcs = [
|
|
|
|
"BUILD",
|
|
|
|
],
|
2019-02-11 22:18:56 +00:00
|
|
|
visibility = ["//:__subpackages__"],
|
2019-01-16 22:00:03 +00:00
|
|
|
)
|