Skip to content

Commit bc8d954

Browse files
committed
apachegh-674: Fix documentation and add test_package for rsa_utils.
1 parent 38f90c2 commit bc8d954

File tree

7 files changed

+38
-3
lines changed

7 files changed

+38
-3
lines changed

bundles/remote_services/rsa_utils/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ add_library(rsa_utils STATIC ${RSA_UTILS_SRC})
2323
set_target_properties(rsa_utils PROPERTIES OUTPUT_NAME "celix_rsa_utils")
2424
target_include_directories(rsa_utils PRIVATE src)
2525
target_include_directories(rsa_utils PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>)
26-
target_link_libraries(rsa_utils PUBLIC Celix::framework)
26+
target_link_libraries(rsa_utils PUBLIC Celix::utils PRIVATE Celix::framework)
2727

2828
install(TARGETS rsa_utils EXPORT celix LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT rsa
2929
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix/rsa_utils)

bundles/remote_services/rsa_utils/gtest/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ add_executable(test_rsa_utils
1919
src/RsaUtilsTestSuite.cc
2020
)
2121

22-
target_link_libraries(test_rsa_utils PRIVATE rsa_utils GTest::gtest GTest::gtest_main)
22+
target_link_libraries(test_rsa_utils PRIVATE rsa_utils GTest::gtest GTest::gtest_main Celix::framework)
2323
target_include_directories(test_utils PRIVATE ../src) #for version_private (needs refactoring of test)
2424
add_test(NAME test_rsa_utils COMMAND test_rsa_utils)
2525
setup_target_for_coverage(test_rsa_utils SCAN_DIR ..)

bundles/remote_services/rsa_utils/include/celix_rsa_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extern "C" {
3030
/**
3131
* @brief Create a typed service properties from endpoint properties.
3232
*
33-
* The conversion ensures that "service.ranking" and "bundle.id" (if present) are set as long values and that the
33+
* The conversion ensures that "service.ranking" is set as long value and that the
3434
* "service.version" (if present) is set as version.
3535
*
3636
* Note that the "service.id" long "service.bundleid" properties are set during service registration and

examples/conan_test_package/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ if (TEST_RSA)
9191

9292
add_executable(use_c_rsa_spi test_c_rsa_spi.c)
9393
target_link_libraries(use_c_rsa_spi PRIVATE Celix::c_rsa_spi)
94+
95+
96+
add_executable(use_rsa_utils test_rsa_utils.cc)
97+
target_link_libraries(use_rsa_utils PRIVATE Celix::rsa_utils Celix::utils)
9498
endif ()
9599

96100
option(TEST_RSA_DFI "Test the Remote Service Admin Service DFI" OFF)

examples/conan_test_package/conanfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def test(self):
7777
if self.options["celix"].build_remote_service_admin:
7878
self.run("./use_my_rsa", cwd=os.path.join("deploy", "use_my_rsa"), run_environment=True)
7979
self.run("./use_c_rsa_spi", run_environment=True)
80+
self.run("./use_rsa_utils", run_environment=True)
8081
if self.options["celix"].build_rsa_remote_service_admin_dfi and self.options["celix"].build_launcher:
8182
self.run("./use_rsa_dfi", cwd=os.path.join("deploy", "use_rsa_dfi"), run_environment=True)
8283
if self.options["celix"].build_rsa_remote_service_admin_shm_v2:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
//
18+
19+
#include <celix_rsa_utils.h>
20+
#include <celix_properties.h>
21+
#include <stdio.h>
22+
23+
int main() {
24+
celix_autoptr(celix_properties_t) props = nullptr;
25+
celix_rsaUtils_createServicePropertiesFromEndpointProperties(nullptr, &props);
26+
printf("use rsa_utils\n");
27+
return 0;
28+
}

examples/conan_test_package_v2/conanfile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def test(self):
9393
if celix_options.build_remote_service_admin:
9494
self.run("./use_my_rsa", cwd=os.path.join("deploy", "use_my_rsa"), env="conanrun")
9595
self.run("./conan_test_package/use_c_rsa_spi", env="conanrun")
96+
self.run("./conan_test_package/use_rsa_utils", env="conanrun")
97+
9698
if celix_options.build_rsa_remote_service_admin_dfi and celix_options.build_launcher:
9799
self.run("./use_rsa_dfi", cwd=os.path.join("deploy", "use_rsa_dfi"), env="conanrun")
98100
if celix_options.build_rsa_remote_service_admin_shm_v2:

0 commit comments

Comments
 (0)