Modify mock directory to improve SAM score 75/237375/2
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 30 Jun 2020 00:28:45 +0000 (09:28 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 30 Jun 2020 01:12:59 +0000 (10:12 +0900)
Change-Id: I89f31b58ae9adb2bea93a033cf1ca43639347f10
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
12 files changed:
mock/fff.h [moved from unit_tests/mock/fff.h with 100% similarity]
mock/mock.cc [moved from unit_tests/mock/mock.cc with 100% similarity]
mock/mock.h [moved from unit_tests/mock/mock.h with 100% similarity]
mock/mock_aul_comp_context.h [moved from unit_tests/mock/mock_aul_comp_context.h with 100% similarity]
mock/mock_aul_comp_info.h [moved from unit_tests/mock/mock_aul_comp_info.h with 100% similarity]
mock/mock_aul_comp_types.h [moved from unit_tests/mock/mock_aul_comp_types.h with 100% similarity]
packaging/capi-appfw-component-manager.spec
unit_tests/CMakeLists.txt
unit_tests/src/test_component_context.cc
unit_tests/src/test_component_info.cc
unit_tests/src/test_component_manager.cc
unit_tests/src/test_component_manager_extension.cc

similarity index 100%
rename from unit_tests/mock/fff.h
rename to mock/fff.h
similarity index 100%
rename from unit_tests/mock/mock.cc
rename to mock/mock.cc
similarity index 100%
rename from unit_tests/mock/mock.h
rename to mock/mock.h
index 4935e31..79a88b1 100644 (file)
@@ -76,7 +76,7 @@ find . -name '*.gcno' -exec cp -rf '{}' gcov-obj ';'
 %endif
 
 %check
-ctest --output-on-failure %{?_smp_mflags}
+ctest --verbose %{?_smp_mflags}
 %if 0%{?gcov:1}
 lcov -c --ignore-errors graph --no-external -q -d . -o component-manager.info
 genhtml component-manager.info -o component-manager.out
index 2d62401..ff45334 100644 (file)
@@ -20,9 +20,10 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-O2")
 
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../src)
 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/mock)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../mock)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../)
 
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/mock UNIT_TEST_MOCK_SOURCES)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../mock UNIT_TEST_MOCK_SOURCES)
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/src UNIT_TEST_SOURCES)
 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../src COMPMGR_SOURCES)
 
index 0961ca8..2df6293 100644 (file)
 #include <iostream>
 #include <memory>
 
-#include "mock_aul_comp_types.h"
-#include "mock_aul_comp_context.h"
-#include "component_manager.h"
+#include "include/component_manager.h"
+
+#include "mock/mock_aul_comp_context.h"
+#include "mock/mock_aul_comp_types.h"
 
 static int __fake_aul_comp_context_create(const char* comp_id,
     aul_comp_context_h* handle) {
index fec4a5f..582fba9 100644 (file)
@@ -21,8 +21,9 @@
 #include <iostream>
 #include <memory>
 
-#include "mock_aul_comp_info.h"
-#include "component_manager.h"
+#include "include/component_manager.h"
+
+#include "mock/mock_aul_comp_info.h"
 
 static const char ICON_PATH[] =
   "/opt/usr/home/owner/apps_rw/org.tizen.helloworld/shared/res/helloworld.png";
index fe9da27..d747b89 100644 (file)
 #include <iostream>
 #include <memory>
 
-#include "mock_aul_comp_info.h"
-#include "mock_aul_comp_context.h"
-#include "component_manager.h"
+#include "include/component_manager.h"
+
+#include "mock/mock_aul_comp_context.h"
+#include "mock/mock_aul_comp_info.h"
 
 static int __fake_aul_comp_info_foreach_comp_info(aul_comp_info_cb callback,
     void* user_data) {
index 5dc40cb..f7680ef 100644 (file)
@@ -21,8 +21,9 @@
 #include <iostream>
 #include <memory>
 
-#include "mock_aul_comp_context.h"
-#include "component_manager_extension.h"
+#include "include/component_manager_extension.h"
+
+#include "mock/mock_aul_comp_context.h"
 
 static int __fake_aul_comp_context_create(const char* comp_id,
     aul_comp_context_h* handle) {