[Test] remove unnecessary test
authorJaeyun Jung <jy1210.jung@samsung.com>
Tue, 25 Apr 2023 03:48:45 +0000 (12:48 +0900)
committerwooksong <wook16.song@samsung.com>
Tue, 25 Apr 2023 04:26:31 +0000 (13:26 +0900)
Code clean, remove empty testcase.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
packaging/machine-learning-api.spec
tests/daemon/meson.build
tests/daemon/unittest_dbus_model.cc [deleted file]

index 8cbfe23..8a038ee 100644 (file)
@@ -377,7 +377,6 @@ bash %{test_script} ./tests/capi/unittest_capi_datatype_consistency
 
 %if 0%{?enable_ml_service}
 bash %{test_script} ./tests/daemon/unittest_ml_agent
-bash %{test_script} ./tests/daemon/unittest_dbus_model
 bash %{test_script} ./tests/daemon/unittest_service_db
 bash %{test_script} ./tests/capi/unittest_capi_service_agent_client
 %endif
index 263dab1..0567aef 100644 (file)
@@ -7,15 +7,6 @@ unittest_ml_agent = executable('unittest_ml_agent',
 )
 test('unittest_ml_agent', unittest_ml_agent, env: testenv, timeout: 100)
 
-unittest_dbus_model = executable('unittest_dbus_model',
-  'unittest_dbus_model.cc',
-  dependencies: [unittest_common_dep, ai_service_daemon_deps],
-  install: get_option('install-test'),
-  install_dir: unittest_install_dir,
-  include_directories: [nns_capi_include, nns_ml_agent_incs],
-)
-test('unittest_dbus_model', unittest_dbus_model, env: testenv, timeout: 100)
-
 unittest_service_db = executable('unittest_service_db',
   'unittest_service_db.cc',
   dependencies: [unittest_common_dep, service_db_dep_for_test],
diff --git a/tests/daemon/unittest_dbus_model.cc b/tests/daemon/unittest_dbus_model.cc
deleted file mode 100644 (file)
index 7d145f0..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * @file        unittest_dbus_model.cc
- * @date        29 Jul 2022
- * @brief       Unit test for DBus Model interface
- * @see         https://github.com/nnstreamer/api
- * @author      Sangjung Woo <sangjung.woo@samsung.com>
- * @bug         No known bugs
- */
-
-#include <gio/gio.h>
-#include <gtest/gtest.h>
-#include <errno.h>
-
-#include "dbus-interface.h"
-#include "model-dbus.h"
-
-/**
- * @brief Test base class of DBus Model interface
- */
-class DbusModelTest : public::testing::Test
-{
-protected:
-  GTestDBus *dbus;
-  GDBusProxy *server_proxy;
-  MachinelearningServiceModel *client_proxy;
-
-public:
-  /**
-   * @brief Construct a new DbusModelTest object
-   */
-  DbusModelTest()
-    : dbus(nullptr), server_proxy(nullptr), client_proxy(nullptr) { }
-
-  /**
-   * @brief Setup method for each test case.
-   */
-  void SetUp() override
-  {
-    g_autofree gchar *services_dir = g_build_filename (g_get_current_dir (), "tests/services", NULL);
-    dbus = g_test_dbus_new (G_TEST_DBUS_NONE);
-    g_test_dbus_add_service_dir (dbus, services_dir);
-    g_test_dbus_up (dbus);
-
-    GError *error = NULL;
-    server_proxy = g_dbus_proxy_new_for_bus_sync (
-      G_BUS_TYPE_SESSION,
-      G_DBUS_PROXY_FLAGS_NONE,
-      NULL,
-      DBUS_ML_BUS_NAME,
-      DBUS_MODEL_PATH,
-      DBUS_MODEL_INTERFACE,
-      NULL,
-      &error);
-
-    if (!server_proxy || error) {
-      if (error) {
-        g_critical ("Error Message : %s", error->message);
-        g_clear_error (&error);
-      }
-    }
-
-    client_proxy = machinelearning_service_model_proxy_new_for_bus_sync (
-      G_BUS_TYPE_SESSION,
-      G_DBUS_PROXY_FLAGS_NONE,
-      DBUS_ML_BUS_NAME,
-      DBUS_MODEL_PATH,
-      NULL, &error);
-    if (!client_proxy || error) {
-      if (error) {
-        g_critical ("Error Message : %s", error->message);
-        g_clear_error (&error);
-      }
-    }
-  }
-
-  /**
-   * @brief Teardown method for each test case.
-   */
-  void TearDown() override
-  {
-    if (server_proxy)
-      g_object_unref (server_proxy);
-
-    if (client_proxy)
-      g_object_unref (client_proxy);
-
-    g_test_dbus_down (dbus);
-    g_object_unref (dbus);
-  }
-};
-
-/**
- * @brief Main gtest
- */
-int
-main (int argc, char **argv)
-{
-  int result = -1;
-
-  try {
-    testing::InitGoogleTest (&argc, argv);
-  } catch (...) {
-    g_warning ("catch 'testing::internal::<unnamed>::ClassUniqueToAlwaysTrue'");
-  }
-
-  try {
-    result = RUN_ALL_TESTS ();
-  } catch (...) {
-    g_warning ("catch `testing::internal::GoogleTestFailureException`");
-  }
-
-  return result;
-}