Skip to content
Permalink
Browse files
Add test_package for syslog_writer.
  • Loading branch information
PengZheng committed Mar 17, 2022
1 parent c0c0c6d commit b3ee2315999a167074d6449dc7eea79b74c02c04
Showing 2 changed files with 13 additions and 0 deletions.
@@ -63,3 +63,13 @@ if (TEST_LOG_SERVICE)
celix_container_bundles(use_log_writer LEVEL 1 my_log_writer)
celix_container_bundles(use_log_writer LEVEL 2 hello)
endif ()

option(TEST_SYSLOG_WRITER "Test syslog_writer" OFF)
if (TEST_SYSLOG_WRITER)
add_celix_container(use_syslog_writer COPY)
# make sure log_admin is accessible
celix_container_bundles(use_syslog_writer LEVEL 0 Celix::log_admin)
# make sure my_log_writer is available to hello
celix_container_bundles(use_syslog_writer LEVEL 1 Celix::syslog_writer)
celix_container_bundles(use_syslog_writer LEVEL 2 hello)
endif ()
@@ -33,6 +33,7 @@ def build(self):
cmake = CMake(self)
cmake.definitions["TEST_HTTP_ADMIN"] = self.options["celix"].build_http_admin
cmake.definitions["TEST_LOG_SERVICE"] = self.options["celix"].build_log_service
cmake.definitions["TEST_SYSLOG_WRITER"] = self.options["celix"].build_syslog_writer
cmake.definitions["CMAKE_PROJECT_test_package_INCLUDE"] = os.path.join(self.build_folder, "conan_paths.cmake")
cmake.configure()
cmake.build()
@@ -44,3 +45,5 @@ def test(self):
self.run("./use_http_admin", cwd=os.path.join("deploy", "use_http_admin"), run_environment=True)
if self.options["celix"].build_log_service:
self.run("./use_log_writer", cwd=os.path.join("deploy", "use_log_writer"), run_environment=True)
if self.options["celix"].build_syslog_writer:
self.run("./use_syslog_writer", cwd=os.path.join("deploy", "use_syslog_writer"), run_environment=True)

0 comments on commit b3ee231

Please sign in to comment.