[CodeClean] fix path to run test
authorJaeyun Jung <jy1210.jung@samsung.com>
Thu, 8 Feb 2024 08:34:27 +0000 (17:34 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Tue, 13 Feb 2024 07:11:22 +0000 (16:11 +0900)
Code clean, update document and fix path to run unittest.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
daemon/mlops-agent-interface.c
meson.build
packaging/mlops-agent.spec
packaging/run-unittest.sh
tests/daemon/unittest_mlops_agent.cc

index 07d8134131114aac7f6822b05cc885314da8aa1e..14cc1fbec99eec962626978ce925da31d9ce9c81 100755 (executable)
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: Apache-2.0 */
 /**
- * @file    ml-agent-interface.c
+ * @file    mlops-agent-interface.c
  * @date    5 April 2023
  * @brief   A set of exported ml-agent interfaces for managing pipelines, models, and other service.
  * @see     https://github.com/nnstreamer/deviceMLOps.MLAgent
index 5872e0f2e3fb53435aa6fc576af51141938e3c8b..4094d18040855336f4b89646ce81cae3a1482dbc 100644 (file)
@@ -86,9 +86,6 @@ if get_option('enable-tizen')
   add_project_arguments('-D__TIZEN__=1', language: ['c', 'cpp'])
 endif
 
-serviceDBPath = get_option('service-db-path')
-add_project_arguments('-DSYS_DB_DIR="' + serviceDBPath + '"', language: ['c', 'cpp'])
-
 # Set install path
 ml_agent_install_prefix = get_option('prefix')
 ml_agent_install_libdir = join_paths(ml_agent_install_prefix, get_option('libdir'))
index c4c3667d818bc9ee393da96202f6ff5d45181583..59b896af0a7454d56e70577b9ec45bded6df6aa6 100644 (file)
@@ -10,6 +10,8 @@
 
 ###########################################################################
 # Macros for building and testing option control
+# Note that, when changing install path for unittest,
+# you should update 'run-unittest.sh' in packaging directory.
 %define                builddir build
 %define                source_root %{_builddir}/%{?buildsubdir}
 %define                test_script %{source_root}/packaging/run_unittests.sh
@@ -265,8 +267,6 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests
 %files unittests
 %manifest mlops-agent.manifest
 %{test_base_dir}/unittests
-%{_libdir}/libmlops-agent-test.a
-%{_libdir}/libmlops-agent-test.so*
 %if 0%{?gcov:1}
 %{_bindir}/tizen-unittests/%{name}/run-unittest.sh
 %endif # gcov
index 66dc248e96077deee9e62fd3057365f860138eee..52b43ace4219a7f3cc08236363da101e99d90df8 100755 (executable)
@@ -7,13 +7,13 @@
 ##
 setup() {
     echo "setup start"
-    export MLAPI_SOURCE_ROOT_PATH=/usr/bin/unittest-ml
-    pushd /usr/bin/unittest-ml
+    export MLAGENT_SOURCE_ROOT_PATH=/usr/bin/ml-test/unittests
+    pushd /usr/bin/ml-test/unittests
 }
 
 test_main() {
     echo "test_main start"
-       testlist=$(find /usr/bin/unittest-ml -type f -executable -name "unittest_*")
+       testlist=$(find /usr/bin/ml-test/unittests -type f -executable -name "unittest_*")
     for test in ${testlist}; do
          ${test}
     done
index f2734e9d8de0b029bffc5c844ee80bc13e90d3a8..9ddba352b19b71f4d3e20368bb3b03773467617a 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file        unittest_ml_agent.cc
+ * @file        unittest_mlops_agent.cc
  * @date        16 Jul 2022
  * @brief       Unit test for ML-Agent and its interface
  * @see         https://github.com/nnstreamer/deviceMLOps.MLAgent