diff --git a/score/test/component/BUILD b/score/test/component/BUILD index dc443e6a..e00a9ca8 100644 --- a/score/test/component/BUILD +++ b/score/test/component/BUILD @@ -33,9 +33,7 @@ pkg_tar( pkg_tar( name = "_datarouter_conf_pkg", - srcs = ["//score/test/component/datarouter:datarouter_test_config_files"], - package_dir = "opt/datarouter", - strip_prefix = "/score/test/component/datarouter", + srcs = ["//score/test/component/datarouter:datarouter_docker_config_pkg"], target_compatible_with = ["@platforms//os:linux"], ) diff --git a/score/test/component/datarouter/BUILD b/score/test/component/datarouter/BUILD index fab77b03..798592fb 100644 --- a/score/test/component/datarouter/BUILD +++ b/score/test/component/datarouter/BUILD @@ -12,7 +12,7 @@ # ******************************************************************************* load("@rules_cc//cc:cc_binary.bzl", "cc_binary") -load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files") +load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files", "strip_prefix") load("@rules_pkg//pkg:tar.bzl", "pkg_tar") load("//score/test/component:defs.bzl", "py_logging_itf_test") @@ -95,6 +95,19 @@ pkg_files( visibility = ["//score/test/component:__subpackages__"], ) +# Docker image config. Package-relative strip so the etc/ files resolve to +# opt/datarouter/etc/* whether score_logging is built as the root module or +# consumed as an external dependency (an absolute strip_prefix only matches +# when logging is root and silently leaves the external/score_logging+/ prefix +# otherwise). +pkg_files( + name = "datarouter_docker_config_pkg", + srcs = [":datarouter_test_config_files"], + prefix = "opt/datarouter", + strip_prefix = strip_prefix.from_pkg(), + visibility = ["//score/test/component:__subpackages__"], +) + py_logging_itf_test( name = "test_datarouter_filters", srcs = ["test_datarouter_filters.py"],