2021-02-26 20:21:13 +00:00
|
|
|
load("@bazel_skylib//rules:build_test.bzl", "build_test")
|
2021-07-28 15:13:03 +00:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_test")
|
2021-02-26 20:21:13 +00:00
|
|
|
|
|
|
|
exports_files(
|
|
|
|
[
|
|
|
|
"BUILD.openssl.bazel",
|
|
|
|
],
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
)
|
|
|
|
|
2021-07-28 15:13:03 +00:00
|
|
|
cc_test(
|
|
|
|
name = "openssl_test",
|
|
|
|
srcs = ["openssl_test.cc"],
|
|
|
|
linkopts = select({
|
2021-08-17 14:05:12 +00:00
|
|
|
"@openssl//:msvc_compiler": [
|
2021-07-28 15:13:03 +00:00
|
|
|
"advapi32.lib",
|
|
|
|
"user32.lib",
|
|
|
|
],
|
|
|
|
"//conditions:default": [],
|
|
|
|
}),
|
|
|
|
deps = ["@openssl"],
|
|
|
|
)
|
|
|
|
|
2021-02-26 20:21:13 +00:00
|
|
|
build_test(
|
2021-07-28 15:13:03 +00:00
|
|
|
name = "build_test",
|
2021-02-26 20:21:13 +00:00
|
|
|
targets = [
|
|
|
|
"@openssl//:openssl",
|
2022-11-03 21:24:31 +00:00
|
|
|
"@openssl//:runnable_openssl",
|
2021-02-26 20:21:13 +00:00
|
|
|
],
|
|
|
|
visibility = ["//:__pkg__"],
|
|
|
|
)
|
2021-07-28 15:13:03 +00:00
|
|
|
|
2022-11-03 21:24:31 +00:00
|
|
|
sh_test(
|
|
|
|
name = "openssl_launch_test",
|
|
|
|
srcs = ["openssl_test.sh"],
|
|
|
|
data = ["@openssl//:runnable_openssl"],
|
|
|
|
env = {
|
|
|
|
"OPENSSL": "$(rootpath @openssl//:runnable_openssl)",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2021-07-28 15:13:03 +00:00
|
|
|
test_suite(
|
|
|
|
name = "openssl_test_suite",
|
|
|
|
tests = [
|
|
|
|
":build_test",
|
2022-11-03 21:24:31 +00:00
|
|
|
":openssl_launch_test",
|
2021-07-28 15:13:03 +00:00
|
|
|
":openssl_test",
|
|
|
|
],
|
|
|
|
visibility = ["//:__pkg__"],
|
|
|
|
)
|