Skip to content
Permalink
Browse files
Add test_package for remaining pubsub components.
  • Loading branch information
PengZheng committed Mar 21, 2022
1 parent ee74c8f commit 7bff6a05c1f40b7e8e77427917d4fd40b5db3a48
Showing 2 changed files with 85 additions and 1 deletion.
@@ -141,3 +141,73 @@ if (TEST_PUBSUB)
PUBSUB_TOPOLOGY_MANAGER_VERBOSE=true
)
endif ()

option(TEST_PSA_ZMQ "Test ZeroMQ PubSub Admin" OFF)
if (TEST_PSA_ZMQ)
add_celix_container(use_psa_zmq
BUNDLES
Celix::celix_pubsub_serializer_json
Celix::celix_pubsub_serializer_avrobin
Celix::celix_pubsub_topology_manager
Celix::celix_pubsub_admin_zmq
hello
PROPERTIES
PUBSUB_TOPOLOGY_MANAGER_VERBOSE=true
)
endif ()

option(TEST_PSA_TCP "Test TCP PubSub Admin" OFF)
if (TEST_PSA_TCP)
add_celix_container(use_psa_tcp
BUNDLES
Celix::celix_pubsub_serializer_json
Celix::celix_pubsub_topology_manager
Celix::celix_pubsub_admin_tcp
hello
PROPERTIES
PSA_TCP_VERBOSE=true
PUBSUB_TOPOLOGY_MANAGER_VERBOSE=true
)
endif ()

option(TEST_PSA_UDP_MC "Test UDP MC PubSub Admin" OFF)
if (TEST_PSA_UDP_MC)
add_celix_container(use_psa_udp_mc
BUNDLES
Celix::celix_pubsub_serializer_json
Celix::celix_pubsub_topology_manager
Celix::celix_pubsub_admin_udp_multicast
hello
PROPERTIES
PSA_UDPMC_VERBOSE=true
PUBSUB_TOPOLOGY_MANAGER_VERBOSE=true
)
endif ()

option(TEST_PSA_WS "Test WebSocket PubSub Admin" OFF)
if (TEST_PSA_WS)
add_celix_container(use_psa_ws
BUNDLES
Celix::http_admin
Celix::celix_pubsub_serializer_json
Celix::celix_pubsub_topology_manager
Celix::celix_pubsub_admin_websocket
hello
PROPERTIES
PUBSUB_TOPOLOGY_MANAGER_VERBOSE=true
)
endif ()

option(TEST_PSA_DISCOVERY_ETCD "Test the PubSub Discovery (ETCD) bundle" OFF)
if (TEST_PSA_DISCOVERY_ETCD)
add_celix_container(use_psa_discovery_etcd
BUNDLES
Celix::celix_pubsub_serializer_json
Celix::celix_pubsub_topology_manager
Celix::celix_pubsub_discovery_etcd
my_pubsub_admin
hello
PROPERTIES
PUBSUB_TOPOLOGY_MANAGER_VERBOSE=true
)
endif ()
@@ -45,6 +45,11 @@ def build(self):
cmake.definitions["TEST_PROMISES"] = self.options["celix"].build_promises
cmake.definitions["TEST_PUSHSTREAMS"] = self.options["celix"].build_pushstreams
cmake.definitions["TEST_PUBSUB"] = self.options["celix"].build_pubsub
cmake.definitions["TEST_PSA_ZMQ"] = self.options["celix"].build_pubsub_psa_zmq
cmake.definitions["TEST_PSA_TCP"] = self.options["celix"].build_pubsub_psa_tcp
cmake.definitions["TEST_PSA_UDP_MC"] = self.options["celix"].build_pubsub_psa_udp_mc
cmake.definitions["TEST_PSA_WS"] = self.options["celix"].build_pubsub_psa_ws
cmake.definitions["TEST_PSA_DISCOVERY_ETCD"] = self.options["celix"].build_pubsub_discovery_etcd
cmake.definitions["CMAKE_PROJECT_test_package_INCLUDE"] = os.path.join(self.build_folder, "conan_paths.cmake")
# the following is workaround https://github.com/conan-io/conan/issues/7192
cmake.definitions["CMAKE_EXE_LINKER_FLAGS"] = "-Wl,--unresolved-symbols=ignore-in-shared-libs"
@@ -80,4 +85,13 @@ def test(self):
self.run("./use_pushstreams", run_environment=True)
if self.options["celix"].build_pubsub:
self.run("./use_my_psa", cwd=os.path.join("deploy", "use_my_psa"), run_environment=True)

if self.options["celix"].build_pubsub_psa_zmq:
self.run("./use_psa_zmq", cwd=os.path.join("deploy", "use_psa_zmq"), run_environment=True)
if self.options["celix"].build_pubsub_psa_tcp:
self.run("./use_psa_tcp", cwd=os.path.join("deploy", "use_psa_tcp"), run_environment=True)
if self.options["celix"].build_pubsub_psa_udp_mc:
self.run("./use_psa_udp_mc", cwd=os.path.join("deploy", "use_psa_udp_mc"), run_environment=True)
if self.options["celix"].build_pubsub_psa_ws:
self.run("./use_psa_ws", cwd=os.path.join("deploy", "use_psa_ws"), run_environment=True)
if self.options["celix"].build_pubsub_discovery_etcd:
self.run("./use_psa_discovery_etcd", cwd=os.path.join("deploy", "use_psa_discovery_etcd"), run_environment=True)

0 comments on commit 7bff6a0

Please sign in to comment.