Skip to content

Commit

Permalink
Fix memory leaks in test_tm_scoped.
Browse files Browse the repository at this point in the history
  • Loading branch information
PengZheng committed Sep 25, 2023
1 parent 5fc94f5 commit 8b90f78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
# under the License.

find_package(CURL REQUIRED)
find_package(civetweb REQUIRED)
find_package(libffi REQUIRED)

include_directories(
${PROJECT_SOURCE_DIR}/framework/public/include
Expand Down Expand Up @@ -44,6 +46,8 @@ target_link_libraries(test_tm_scoped PRIVATE
calculator_api
Celix::rsa_common
CURL::libcurl
civetweb::civetweb
libffi::libffi
)

add_celix_bundle_dependencies(test_tm_scoped Celix::rsa_dfi Celix::rsa_topology_manager calculator topology_manager_disc_mock_bundle topology_manager_test_bundle)
Expand Down
3 changes: 3 additions & 0 deletions bundles/remote_services/topology_manager/tms_tst/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
*/

#include <curl/curl.h>
#include <civetweb.h>
#include <gtest/gtest.h>

int main(int argc, char **argv) {
curl_global_init(CURL_GLOBAL_ALL);
mg_init_library(MG_FEATURES_ALL);
::testing::InitGoogleTest(&argc, argv);
int rc = RUN_ALL_TESTS();
mg_exit_library();
curl_global_cleanup();
return rc;
}

0 comments on commit 8b90f78

Please sign in to comment.