From 1b7a5f3d907c6e9000660d9d4867953f7a2beb8d Mon Sep 17 00:00:00 2001 From: Jaeyun Jung Date: Wed, 21 Aug 2024 16:45:37 +0900 Subject: [PATCH] [Test] file name for test Code clean, update file name for custom library test and fix indent. Signed-off-by: Jaeyun Jung --- include/nnstreamer-edge-custom.h | 5 +++-- tests/CMakeLists.txt | 15 +++++++-------- ...dge-custom.c => nnstreamer-edge-custom-test.c} | 2 +- tests/unittest_nnstreamer-edge.cc | 2 -- 4 files changed, 11 insertions(+), 13 deletions(-) rename tests/{nnstreamer-edge-custom.c => nnstreamer-edge-custom-test.c} (99%) diff --git a/include/nnstreamer-edge-custom.h b/include/nnstreamer-edge-custom.h index 5fee205..eee6504 100644 --- a/include/nnstreamer-edge-custom.h +++ b/include/nnstreamer-edge-custom.h @@ -20,7 +20,9 @@ extern "C" { #endif /* __cplusplus */ /** - * @brief NNStreamer Edge custom connection definition. This is used to define a custom connsction. The user should implement the functions and provide them using nns_edge_custom_get_instance(). Refer to the example in nnstreamer-edge-custom.c for more details. + * @brief NNStreamer Edge custom connection definition. This is used to define a custom connection. + * The user should implement the functions and provide them using nns_edge_custom_get_instance(). + * Refer to the example in nnstreamer-edge-custom-test.c for more details. */ typedef struct _NnsEdgeCustomDef { @@ -43,7 +45,6 @@ typedef struct _NnsEdgeCustomDef */ void* nns_edge_custom_get_instance (); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0d84476..5a919be 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,17 +5,16 @@ TARGET_LINK_LIBRARIES(unittest_nnstreamer-edge ${TEST_REQUIRE_PKGS_LDFLAGS} ${NN INSTALL (TARGETS unittest_nnstreamer-edge DESTINATION ${BIN_INSTALL_DIR}) # Custom connection lib for unit test -SET(NNS_EDGE_CUSTOM_LIB_NAME nnstreamer-edge-custom-test) -SET(NNS_EDGE_CUSTOM_SRCS ${NNS_EDGE_SRCS} nnstreamer-edge-custom.c) -ADD_LIBRARY(${NNS_EDGE_CUSTOM_LIB_NAME} SHARED ${NNS_EDGE_CUSTOM_SRCS}) -SET_TARGET_PROPERTIES(${NNS_EDGE_CUSTOM_LIB_NAME} PROPERTIES VERSION ${SO_VERSION}) -TARGET_INCLUDE_DIRECTORIES(${NNS_EDGE_CUSTOM_LIB_NAME} PRIVATE ${EDGE_REQUIRE_PKGS_INCLUDE_DIRS} ${INCLUDE_DIR} ${NNS_EDGE_SRC_DIR}) -TARGET_LINK_LIBRARIES(${NNS_EDGE_CUSTOM_LIB_NAME} ${TEST_REQUIRE_PKGS_LDFLAGS} ${NNS_EDGE_LIB_NAME}) -INSTALL (TARGETS ${NNS_EDGE_CUSTOM_LIB_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) +SET(NNS_EDGE_CUSTOM_TEST_LIB_NAME nnstreamer-edge-custom-test) +SET(NNS_EDGE_CUSTOM_SRCS ${NNS_EDGE_SRCS} nnstreamer-edge-custom-test.c) +ADD_LIBRARY(${NNS_EDGE_CUSTOM_TEST_LIB_NAME} SHARED ${NNS_EDGE_CUSTOM_SRCS}) +TARGET_INCLUDE_DIRECTORIES(${NNS_EDGE_CUSTOM_TEST_LIB_NAME} PRIVATE ${EDGE_REQUIRE_PKGS_INCLUDE_DIRS} ${INCLUDE_DIR} ${NNS_EDGE_SRC_DIR}) +TARGET_LINK_LIBRARIES(${NNS_EDGE_CUSTOM_TEST_LIB_NAME} ${TEST_REQUIRE_PKGS_LDFLAGS} ${NNS_EDGE_LIB_NAME}) +INSTALL (TARGETS ${NNS_EDGE_CUSTOM_TEST_LIB_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) ADD_EXECUTABLE(unittest_nnstreamer-edge-custom unittest_nnstreamer-edge-custom.cc) TARGET_INCLUDE_DIRECTORIES(unittest_nnstreamer-edge-custom PRIVATE ${EDGE_REQUIRE_PKGS_INCLUDE_DIRS} ${INCLUDE_DIR} ${NNS_EDGE_SRC_DIR}) -TARGET_LINK_LIBRARIES(unittest_nnstreamer-edge-custom ${TEST_REQUIRE_PKGS_LDFLAGS} ${NNS_EDGE_LIB_NAME} ${NNS_EDGE_CUSTOM_LIB_NAME}) +TARGET_LINK_LIBRARIES(unittest_nnstreamer-edge-custom ${TEST_REQUIRE_PKGS_LDFLAGS} ${NNS_EDGE_LIB_NAME} ${NNS_EDGE_CUSTOM_TEST_LIB_NAME}) INSTALL (TARGETS unittest_nnstreamer-edge-custom DESTINATION ${BIN_INSTALL_DIR}) # AITT test diff --git a/tests/nnstreamer-edge-custom.c b/tests/nnstreamer-edge-custom-test.c similarity index 99% rename from tests/nnstreamer-edge-custom.c rename to tests/nnstreamer-edge-custom-test.c index 7dc6586..48f599f 100644 --- a/tests/nnstreamer-edge-custom.c +++ b/tests/nnstreamer-edge-custom-test.c @@ -2,7 +2,7 @@ /** * Copyright (C) 2024 Gichan Jang * - * @file nnstreamer-edge-custom.c + * @file nnstreamer-edge-custom-test.c * @date 16 Aug 2024 * @brief NNStreamer-edge custom connection for test. * @see https://github.com/nnstreamer/nnstreamer-edge diff --git a/tests/unittest_nnstreamer-edge.cc b/tests/unittest_nnstreamer-edge.cc index 1461b1a..e9d252c 100644 --- a/tests/unittest_nnstreamer-edge.cc +++ b/tests/unittest_nnstreamer-edge.cc @@ -2082,7 +2082,6 @@ TEST(edgeData, deserializeInvalidParam04_n) SAFE_FREE (data); } - /** * @brief Serialize and deserialize the edge-data. */ @@ -2164,7 +2163,6 @@ TEST(edgeDataSerialize, normal) SAFE_FREE (serialized_data); } - /** * @brief Serialize edge-data - invalid param. */ -- 2.34.1