Skip to content

Commit

Permalink
[Test] file name for test
Browse files Browse the repository at this point in the history
Code clean, update file name for custom library test and fix indent.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
  • Loading branch information
jaeyun-jung committed Aug 21, 2024
1 parent 3581d10 commit 080952c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
5 changes: 3 additions & 2 deletions include/nnstreamer-edge-custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -43,7 +45,6 @@ typedef struct _NnsEdgeCustomDef
*/
void* nns_edge_custom_get_instance ();


#ifdef __cplusplus
}
#endif /* __cplusplus */
Expand Down
15 changes: 7 additions & 8 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Copyright (C) 2024 Gichan Jang <gichan2.jang@samsung.com>
*
* @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
Expand Down
2 changes: 0 additions & 2 deletions tests/unittest_nnstreamer-edge.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,6 @@ TEST(edgeData, deserializeInvalidParam04_n)
SAFE_FREE (data);
}


/**
* @brief Serialize and deserialize the edge-data.
*/
Expand Down Expand Up @@ -2164,7 +2163,6 @@ TEST(edgeDataSerialize, normal)
SAFE_FREE (serialized_data);
}


/**
* @brief Serialize edge-data - invalid param.
*/
Expand Down

0 comments on commit 080952c

Please sign in to comment.