Integrate IU unittests into mmi-manager-tests 43/265143/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Mon, 27 Sep 2021 06:05:28 +0000 (15:05 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 12 Oct 2021 02:59:54 +0000 (11:59 +0900)
Change-Id: I8362281a4632f3ca06e4200c094751d4860d1e7c
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
meson.build
packaging/mmi-manager.spec
tests/iu/main.cpp [deleted file]
tests/iu/meson.build [deleted file]
tests/meson.build

index f39656f..74688a8 100644 (file)
@@ -21,6 +21,5 @@ subdir('src/bin')
 subdir('src/modules/ref_fusion')
 subdir('src/modules/modality_keyboard')
 subdir('tests')
-subdir('tests/iu')
 subdir('tests/keyboard-provider')
 subdir('tests/ref-fusion')
index dc15442..401d0b4 100644 (file)
@@ -91,6 +91,5 @@ mkdir -p %{buildroot}%{_libdir}/provider
 %defattr(-,root,root,-)
 %license COPYING
 %{_bindir}/mmi-manager-tests
-%{_bindir}/iu-tests
 %{_bindir}/modality_keyboard-tests
 %{_bindir}/ref_fusion-tests
diff --git a/tests/iu/main.cpp b/tests/iu/main.cpp
deleted file mode 100644 (file)
index fdd74b1..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <gmock/gmock.h>
-
-#define PRINT printf
-
-#ifdef TIZEN_TEST_GCOV
-extern "C" void __gcov_flush(void);
-#endif
-
-int main(int argc, char** argv) {
-       auto testResults = false;
-#ifdef TIZEN_TEST_GCOV
-       setenv("GCOV_PREFIX", "/tmp", 1);
-#endif
-       try
-       {
-               testing::InitGoogleMock(&argc, argv);
-               testing::FLAGS_gtest_death_test_style = "fast";
-       }
-       catch ( ... )
-       {
-               PRINT("Error occurred while trying to initialize GoogleTest.\n");
-               exit(EXIT_FAILURE);
-       }
-
-       try
-       {
-               testResults = (RUN_ALL_TESTS() == 0) ? true : false;
-       }
-       catch (const ::testing::internal::GoogleTestFailureException &e)
-       {
-               testResults = false;
-               PRINT("GoogleTestFailureException has been thrown: %s\n", e.what());
-       }
-
-#ifdef TIZEN_TEST_GCOV
-       __gcov_flush();
-#endif
-       return testResults;
-}
diff --git a/tests/iu/meson.build b/tests/iu/meson.build
deleted file mode 100644 (file)
index 01928c2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-iu_tests_srcs = [
-       'intent_understanding_engine_rule_unittests.cpp',
-       'intent_understanding_engine_unittests.cpp',
-       'iu_rule_unittests.cpp',
-       'main.cpp',
-       'mmi_iu_feed_input_event_unittests.cpp',
-       'mmi_iu_noinit_unittests.cpp',
-       'mmi_iu_unittests.cpp',
-       'output_intent_unittests.cpp',
-       '../../src/mmimgr/iu/input_intent.cpp',
-       '../../src/mmimgr/iu/intent_understanding_engine.cpp',
-       '../../src/mmimgr/iu/iu_rule.cpp',
-       '../../src/mmimgr/iu/mmi_iu.cpp',
-       '../../src/mmimgr/iu/output_intent.cpp'
-       ]
-
-gmock_dep = dependency('gmock', method : 'pkg-config')
-ecore_dep = dependency('ecore', method : 'pkg-config')
-json_glib_dep = dependency('json-glib-1.0', method : 'pkg-config')
-
-incdir = include_directories('../../src/mmimgr/iu')
-
-executable(
-       'iu-tests',
-       iu_tests_srcs,
-       dependencies : [mmimgr_declared_dep, gmock_dep, ecore_dep, json_glib_dep],
-       include_directories : incdir,
-       install_dir : mmi_manager_prefix_bindir,
-       install : true
-       )
index 80d30aa..410dbad 100644 (file)
@@ -4,16 +4,27 @@ mmi_manager_tests_srcs = [
        'mmi-client-tests.cpp',
        'mmi-fusion-tests.cpp',
        'mmi-manager-main-tests.cpp',
-       'ecore-event-dispatcher.cpp'
+       'ecore-event-dispatcher.cpp',
+       'iu/intent_understanding_engine_rule_unittests.cpp',
+       'iu/intent_understanding_engine_unittests.cpp',
+       'iu/iu_rule_unittests.cpp',
+       'iu/mmi_iu_feed_input_event_unittests.cpp',
+       'iu/mmi_iu_noinit_unittests.cpp',
+       'iu/mmi_iu_unittests.cpp',
+       'iu/output_intent_unittests.cpp'
        ]
 
 gmock_dep = dependency('gmock', method : 'pkg-config')
 ecore_dep = dependency('ecore', method : 'pkg-config')
+json_glib_dep = dependency('json-glib-1.0', method : 'pkg-config')
+
+incdir = include_directories('../src/mmimgr/iu')
 
 executable(
        'mmi-manager-tests',
        mmi_manager_tests_srcs,
-       dependencies : [mmimgr_declared_dep, gmock_dep, ecore_dep],
+       dependencies : [mmimgr_declared_dep, gmock_dep, ecore_dep, json_glib_dep],
+       include_directories : incdir,
        install_dir : mmi_manager_prefix_bindir,
        install : true
        )