Project: Use apple_resource_group for test resources. Fix bazelrc (#351)
This commit is contained in:
parent
ef8e9975e9
commit
06d8295d0a
2
.bazelrc
2
.bazelrc
|
@ -1 +1 @@
|
||||||
common --apple_generate_dsym --define=apple.propagate_embedded_extra_outputs=yes
|
build --apple_generate_dsym --define=apple.propagate_embedded_extra_outputs=yes
|
||||||
|
|
|
@ -23,14 +23,14 @@ objc_library(
|
||||||
"SNTNotificationManager.m",
|
"SNTNotificationManager.m",
|
||||||
"main.m",
|
"main.m",
|
||||||
],
|
],
|
||||||
|
data = [
|
||||||
|
"Resources/AboutWindow.xib",
|
||||||
|
"Resources/MessageWindow.xib",
|
||||||
|
],
|
||||||
sdk_frameworks = [
|
sdk_frameworks = [
|
||||||
"IOKit",
|
"IOKit",
|
||||||
"SecurityInterface",
|
"SecurityInterface",
|
||||||
],
|
],
|
||||||
xibs = [
|
|
||||||
"Resources/AboutWindow.xib",
|
|
||||||
"Resources/MessageWindow.xib",
|
|
||||||
],
|
|
||||||
deps = [
|
deps = [
|
||||||
"//Source/common:SNTBlockMessage",
|
"//Source/common:SNTBlockMessage",
|
||||||
"//Source/common:SNTConfigurator",
|
"//Source/common:SNTConfigurator",
|
||||||
|
|
10
helper.bzl
10
helper.bzl
|
@ -1,6 +1,7 @@
|
||||||
"""This module defines some helper rules."""
|
"""This module defines some helper rules."""
|
||||||
|
|
||||||
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_unit_test")
|
load("@build_bazel_rules_apple//apple:macos.bzl", "macos_unit_test")
|
||||||
|
load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_group")
|
||||||
|
|
||||||
def run_command(name, cmd, **kwargs):
|
def run_command(name, cmd, **kwargs):
|
||||||
"""A rule to run a command."""
|
"""A rule to run a command."""
|
||||||
|
@ -21,14 +22,23 @@ def santa_unit_test(name,
|
||||||
deps = [],
|
deps = [],
|
||||||
size = "medium",
|
size = "medium",
|
||||||
minimum_os_version = "10.9",
|
minimum_os_version = "10.9",
|
||||||
|
resources = [],
|
||||||
|
structured_resources = [],
|
||||||
copts = [],
|
copts = [],
|
||||||
**kwargs):
|
**kwargs):
|
||||||
|
apple_resource_group(
|
||||||
|
name = "%s_resources" % name,
|
||||||
|
resources = resources,
|
||||||
|
structured_resources = structured_resources,
|
||||||
|
)
|
||||||
|
|
||||||
native.objc_library(
|
native.objc_library(
|
||||||
name = "%s_lib" % name,
|
name = "%s_lib" % name,
|
||||||
testonly = 1,
|
testonly = 1,
|
||||||
srcs = srcs,
|
srcs = srcs,
|
||||||
deps = deps,
|
deps = deps,
|
||||||
copts = copts,
|
copts = copts,
|
||||||
|
data = [":%s_resources" % name],
|
||||||
**kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue