Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion bazel_common/score_modules_target_sw.MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ git_override(
bazel_dep(name = "score_logging")
git_override(
module_name = "score_logging",
commit = "0e9187f79a9935ca192779234b82f9d00dc4e335",
commit = "254fdfe0e35a2738917fb16d41bb70acc83f32ad",
patch_strip = 1,
patches = [
"//patches/logging:001-logging-example-visibility.patch",
"//patches/logging:002-deps-visibility.patch",
],
remote = "https://github.com/eclipse-score/logging.git",
)
5 changes: 4 additions & 1 deletion known_good.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@
},
"score_logging": {
"repo": "https://github.com/eclipse-score/logging.git",
"hash": "0e9187f79a9935ca192779234b82f9d00dc4e335",
"hash": "254fdfe0e35a2738917fb16d41bb70acc83f32ad",
"bazel_patches": [
"//patches/logging:001-logging-example-visibility.patch",
"//patches/logging:002-deps-visibility.patch"],
"metadata": {
"extra_test_config": [
"@score_logging//score/datarouter/build_configuration_flags:persistent_logging=False",
Expand Down
38 changes: 38 additions & 0 deletions patches/logging/001-logging-example-visibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
diff --git a/score/test/component/dlt_generator_app/BUILD b/score/test/component/dlt_generator_app/BUILD
index 9736cac..a60ebd6 100644
--- a/score/test/component/dlt_generator_app/BUILD
+++ b/score/test/component/dlt_generator_app/BUILD
@@ -29,9 +29,14 @@ load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
cc_binary(
name = "dlt_generator",
srcs = ["dlt_generator.cpp"],
+ visibility = ["//visibility:public"],
deps = ["//score/mw/log"],
)

+exports_files([
+ "etc/logging.json",
+])
+
pkg_tar(
name = "dlt_generator_bin_pkg",
srcs = [":dlt_generator"],
diff --git a/score/test/component/logging_app/BUILD b/score/test/component/logging_app/BUILD
index de63c65..f9f3346 100644
--- a/score/test/component/logging_app/BUILD
+++ b/score/test/component/logging_app/BUILD
@@ -29,9 +29,14 @@ load("@rules_pkg//pkg:tar.bzl", "pkg_tar")
cc_binary(
name = "logging_app",
srcs = ["logging_app.cpp"],
+ visibility = ["//visibility:public"],
deps = ["//score/mw/log"],
)

+exports_files([
+ "etc/logging.json",
+])
+
pkg_tar(
name = "logging_app_bin_pkg",
srcs = [":logging_app"],
13 changes: 13 additions & 0 deletions patches/logging/002-deps-visibility.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/MODULE.bazel b/MODULE.bazel
index 5eed2f9..06fb222 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -47,7 +47,7 @@ bazel_dep(name = "score_itf", version = "0.4.0", dev_dependency = True)

# OCI / Docker image rules for integration tests
bazel_dep(name = "rules_oci", version = "2.2.7", dev_dependency = True)
-bazel_dep(name = "rules_pkg", version = "1.2.0", dev_dependency = True)
+bazel_dep(name = "rules_pkg", version = "1.2.0")

# QNX image filesystem rules for QNX integration tests
bazel_dep(name = "score_rules_imagefs", version = "0.0.1", dev_dependency = True)
Empty file added patches/logging/BUILD
Empty file.
1 change: 1 addition & 0 deletions showcases/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ score_pkg_bundle(
other_package_files = [
"//showcases/standalone:comm_pkg_files",
"//showcases/standalone:kyron_pkg_files",
"//showcases/standalone:logging_pkg_files",
"//showcases/orchestration_persistency:orch_per_pkg_files",
"//showcases/simple_lifecycle:simple_lifecycle_pkg_files",
],
Expand Down
16 changes: 16 additions & 0 deletions showcases/standalone/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,19 @@ score_pkg_bundle(
],
package_dir = "standalone",
)

score_pkg_bundle(
name = "logging",
bins = [
"@score_logging//score/test/component/logging_app:logging_app",
"@score_logging//score/test/component/dlt_generator_app:dlt_generator",
],
config_data = [
"//showcases/standalone:logging.score.json",
],
custom_layout = {
"@score_logging//score/test/component/logging_app:etc/logging.json": "logging_app/etc/logging.json",
"@score_logging//score/test/component/dlt_generator_app:etc/logging.json": "dlt_generator/etc/logging.json",
},
package_dir = "standalone",
)
34 changes: 34 additions & 0 deletions showcases/standalone/logging.score.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"name": "Logging example",
"description": "Example for running logging with all log levels via remote and console",
"apps": [
{
"path": "/bin/sh",
"args": [
"-c",
"cd /usr/bin/datarouter && ./datarouter --no_adaptive_runtime >/dev/null 2>&1 &"
],
"env": {}
},
{
"path": "/showcases/bin/logging_app",
"args": [],
"env": {},
"dir": "/showcases/data/logging/logging_app/etc"
}
]
},
{
"name": "logging : dlt Generator example",
"description": "Example for generating DLT log messages",
"apps": [
{
"path": "/showcases/bin/dlt_generator",
"args": [],
"env": {},
"dir": "/showcases/data/logging/dlt_generator/etc"
}
]
}
]
Loading