From 0755b1f62e2b8136523ac2ca760da3c717259346 Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Fri, 24 Apr 2020 19:48:28 +0900 Subject: [PATCH] build: enable coverage analytics you can build this package to check coverage, by passing --define "gcov 1" to gbs build option. Change-Id: I5d2dc750a8d89979a89caf7e0b62ab1323e0ee3b --- libaurum/src/AccessibleNode.cc | 2 +- libaurum/src/AccessibleUtils.cc | 2 +- libaurum/src/AccessibleWatcher.cc | 2 +- libaurum/src/Comparer.cc | 2 +- libaurum/src/DeviceImpl/TizenImpl.cc | 1 - libaurum/src/PartialMatch.cc | 2 +- libaurum/src/UiObject.cc | 2 +- libaurum/src/Waiter.cc | 2 +- libloguru/src/loguru.cpp | 2 +- meson.build | 3 ++ meson_options.txt | 7 +++ misc/setup_device.sh | 2 +- org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h | 2 +- .../inc/Commands/ClearCommand.h | 2 +- .../inc/Commands/ClickCommand.h | 2 +- .../inc/Commands/CloseAppCommand.h | 2 +- org.tizen.aurum-bootstrap/inc/Commands/Command.h | 2 +- .../inc/Commands/FindElementCommand.h | 2 +- .../inc/Commands/FlickCommand.h | 2 +- .../inc/Commands/GetAppInfoCommand.h | 2 +- .../inc/Commands/GetAttributeCommand.h | 2 +- .../inc/Commands/GetDeviceTimeCommand.h | 2 +- .../inc/Commands/GetLocationCommand.h | 2 +- .../inc/Commands/GetSizeCommand.h | 2 +- .../inc/Commands/GetValueCommand.h | 2 +- .../inc/Commands/InstallAppCommand.h | 2 +- .../inc/Commands/KillServerCommand.h | 2 +- .../inc/Commands/LaunchAppCommand.h | 2 +- .../inc/Commands/LongClickCommand.h | 2 +- .../inc/Commands/PostCommand.h | 2 +- .../inc/Commands/PreCommand.h | 2 +- .../inc/Commands/RemoveAppCommand.h | 2 +- .../inc/Commands/SendKeyCommand.h | 2 +- .../inc/Commands/SetValueCommand.h | 2 +- .../inc/Commands/SyncCommand.h | 2 +- .../inc/Commands/TouchDownCommand.h | 2 +- .../inc/Commands/TouchMoveCommand.h | 2 +- .../inc/Commands/TouchUpCommand.h | 2 +- org.tizen.aurum-bootstrap/meson.build | 2 +- org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc | 2 +- org.tizen.aurum-bootstrap/src/BootstrapServer.cc | 8 ++- .../src/Commands/PostCommand.cc | 3 +- packaging/aurum.spec | 60 ++++++++++++++++++---- tests/meson.build | 7 +-- 44 files changed, 109 insertions(+), 54 deletions(-) diff --git a/libaurum/src/AccessibleNode.cc b/libaurum/src/AccessibleNode.cc index e9ca33b..3d46332 100644 --- a/libaurum/src/AccessibleNode.cc +++ b/libaurum/src/AccessibleNode.cc @@ -2,7 +2,7 @@ #include #include -#include "loguru.hpp" +#include #include "config.h" std::map AccessibleNode::mNodeMap{}; diff --git a/libaurum/src/AccessibleUtils.cc b/libaurum/src/AccessibleUtils.cc index 1b548e5..f1c1949 100644 --- a/libaurum/src/AccessibleUtils.cc +++ b/libaurum/src/AccessibleUtils.cc @@ -1,5 +1,5 @@ #include "AccessibleUtils.h" -#include "loguru.hpp" +#include #include char* state_to_char(AtspiStateType state) diff --git a/libaurum/src/AccessibleWatcher.cc b/libaurum/src/AccessibleWatcher.cc index a24a545..47507ca 100644 --- a/libaurum/src/AccessibleWatcher.cc +++ b/libaurum/src/AccessibleWatcher.cc @@ -5,7 +5,7 @@ #include #include -#include "loguru.hpp" +#include AtspiEventListener *AccessibleWatcher::listener = nullptr; diff --git a/libaurum/src/Comparer.cc b/libaurum/src/Comparer.cc index ac3ffb9..e9cdc11 100644 --- a/libaurum/src/Comparer.cc +++ b/libaurum/src/Comparer.cc @@ -1,6 +1,6 @@ #include "Comparer.h" -#include "loguru.hpp" +#include Comparer::Comparer(const UiDevice *device, const std::shared_ptr selector, const bool &earlyReturn) diff --git a/libaurum/src/DeviceImpl/TizenImpl.cc b/libaurum/src/DeviceImpl/TizenImpl.cc index 8fbf1b6..0214557 100644 --- a/libaurum/src/DeviceImpl/TizenImpl.cc +++ b/libaurum/src/DeviceImpl/TizenImpl.cc @@ -8,7 +8,6 @@ #include #include - #include TizenImpl::TizenImpl() diff --git a/libaurum/src/PartialMatch.cc b/libaurum/src/PartialMatch.cc index 2856288..89e223b 100644 --- a/libaurum/src/PartialMatch.cc +++ b/libaurum/src/PartialMatch.cc @@ -3,7 +3,7 @@ #include #include -#include "loguru.hpp" +#include bool PartialMatch::checkCriteria(const std::string *textA, const std::string textB) { diff --git a/libaurum/src/UiObject.cc b/libaurum/src/UiObject.cc index 23c72ae..67691c4 100644 --- a/libaurum/src/UiObject.cc +++ b/libaurum/src/UiObject.cc @@ -5,7 +5,7 @@ #include #include -#include "loguru.hpp" +#include UiObject::UiObject() : UiObject(nullptr, nullptr, nullptr) {} diff --git a/libaurum/src/Waiter.cc b/libaurum/src/Waiter.cc index 4e4dbec..f353625 100644 --- a/libaurum/src/Waiter.cc +++ b/libaurum/src/Waiter.cc @@ -5,7 +5,7 @@ #include "ISearchable.h" #include "UiObject.h" -#include "loguru.hpp" +#include Waiter::Waiter() : Waiter(nullptr) {} diff --git a/libloguru/src/loguru.cpp b/libloguru/src/loguru.cpp index a2d17ec..06ae87c 100644 --- a/libloguru/src/loguru.cpp +++ b/libloguru/src/loguru.cpp @@ -18,7 +18,7 @@ #pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" #endif -#include "loguru.hpp" +#include #ifndef LOGURU_HAS_BEEN_IMPLEMENTED #define LOGURU_HAS_BEEN_IMPLEMENTED diff --git a/meson.build b/meson.build index ed0f20f..8839d07 100644 --- a/meson.build +++ b/meson.build @@ -12,6 +12,9 @@ if get_option('tizen') == true else message('') endif +if get_option('tizen_gcov') == true + config_h.set10('TIZEN_GCOV', true) +endif root_inc = include_directories('./') diff --git a/meson_options.txt b/meson_options.txt index 7f6e0a0..89a5aec 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -3,6 +3,7 @@ option('tizen', value: false, description: 'enable tizen specific dependancy' ) + option('tzapp_path', type: 'string', value: '/usr/apps/', @@ -13,3 +14,9 @@ option('tzpackage_path', value: '/usr/share/packages/', description: 'installation path for registering tizen service app' ) + +option('tizen_gcov', + type: 'boolean', + value: false, + description: 'enable tizen specific gcov configuration' +) \ No newline at end of file diff --git a/misc/setup_device.sh b/misc/setup_device.sh index 37942f3..fea30b2 100755 --- a/misc/setup_device.sh +++ b/misc/setup_device.sh @@ -1,5 +1,5 @@ #!/bin/bash sdb forward --remove-all sdb forward tcp:50051 tcp:50051 -sdb shell app_launcher -k org.tizen.aurum-bootstrap +sdb shell app_launcher -t org.tizen.aurum-bootstrap sdb shell app_launcher -s org.tizen.aurum-bootstrap diff --git a/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h b/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h index bf6ae41..789c3fc 100644 --- a/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h +++ b/org.tizen.aurum-bootstrap/inc/AurumServiceImpl.h @@ -3,7 +3,7 @@ #include #include "Commands/Command.h" -#include "aurum.grpc.pb.h" +#include class aurumServiceImpl final : public aurum::Bootstrap::Service { public: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h index 0197559..dd6b9f4 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/ClearCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class ClearCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h index cf03a01..527ef78 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/ClickCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class ClickCommand : public Command { protected: diff --git a/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h index fb00f39..1249ebe 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/CloseAppCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class CloseAppCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/Command.h b/org.tizen.aurum-bootstrap/inc/Commands/Command.h index 59bf76e..f902f56 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/Command.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/Command.h @@ -4,7 +4,7 @@ #include #include #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" diff --git a/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h index 0c06ba0..688d87c 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/FindElementCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class FindElementCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h index f78e1e4..b3b62f9 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/FlickCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class FlickCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h index 1a9a146..cdd237e 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetAppInfoCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class GetAppInfoCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h index 8b4e24c..51bdf75 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetAttributeCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class GetAttributeCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h index 4521709..aad9114 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetDeviceTimeCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class GetDeviceTimeCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h index 2cb1341..b25c5cf 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetLocationCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class GetLocationCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h index d6c8a33..bd41080 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetSizeCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class GetSizeCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h index ccbd6ec..6f72bd3 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/GetValueCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class GetValueCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h index 91c4d82..5b5d326 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/InstallAppCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class InstallAppCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h index 3121ac1..4057427 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/KillServerCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class KillServerCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h index 2227fed..822d158 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/LaunchAppCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class LaunchAppCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h index 86a0b83..1eb1dde 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/LongClickCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class LongClickCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h index 29bd8a2..6110523 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/PostCommand.h @@ -4,7 +4,7 @@ #include #include #include "Commands/Command.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class PostCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h index 7d59d2a..ad3145b 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/PreCommand.h @@ -4,7 +4,7 @@ #include #include #include "Commands/Command.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class PreCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h index 5d6a0c4..71e6dbb 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/RemoveAppCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class RemoveAppCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h index 96fd071..a0442c6 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/SendKeyCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class SendKeyCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h index 13cf245..f752063 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/SetValueCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class SetValueCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/SyncCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/SyncCommand.h index ecc7d6a..c54c978 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/SyncCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/SyncCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class SyncCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h index 29b796b..af973bb 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/TouchDownCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class TouchDownCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h index 12b719a..08512a6 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/TouchMoveCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class TouchMoveCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h b/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h index 7ddc9e0..7d59cd7 100644 --- a/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h +++ b/org.tizen.aurum-bootstrap/inc/Commands/TouchUpCommand.h @@ -5,7 +5,7 @@ #include #include "Commands/Command.h" #include "ObjectMapper.h" -#include "aurum.grpc.pb.h" +#include #include "config.h" class TouchUpCommand : public Command { diff --git a/org.tizen.aurum-bootstrap/meson.build b/org.tizen.aurum-bootstrap/meson.build index f79be31..cf76b02 100644 --- a/org.tizen.aurum-bootstrap/meson.build +++ b/org.tizen.aurum-bootstrap/meson.build @@ -69,4 +69,4 @@ bootstrap_svr_bin = executable( pie:true, ) -install_data('org.tizen.aurum-bootstrap.xml', install_dir: get_option('tzpackage_path')) +install_data('org.tizen.aurum-bootstrap.xml', install_dir: get_option('tzpackage_path')) \ No newline at end of file diff --git a/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc b/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc index 89e7c60..ae7da19 100644 --- a/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc +++ b/org.tizen.aurum-bootstrap/src/AurumServiceImpl.cc @@ -6,7 +6,7 @@ #include "Commands/PreCommand.h" #include "config.h" -#include "loguru.hpp" +#include using namespace grpc; using namespace aurum; diff --git a/org.tizen.aurum-bootstrap/src/BootstrapServer.cc b/org.tizen.aurum-bootstrap/src/BootstrapServer.cc index 1e1169a..ef18b8c 100644 --- a/org.tizen.aurum-bootstrap/src/BootstrapServer.cc +++ b/org.tizen.aurum-bootstrap/src/BootstrapServer.cc @@ -5,11 +5,11 @@ #include #include -#include "aurum.grpc.pb.h" +#include #include "AurumServiceImpl.h" #include "config.h" -#include "loguru.hpp" +#include using namespace grpc; @@ -67,6 +67,10 @@ void service_app_control(app_control_h app_control, void *data) int main(int argc, char **argv) { +#ifdef TIZEN_GCOV + setenv("GCOV_PREFIX", "/tmp/", 1); +#endif + service_app_lifecycle_callback_s event_callback; app_event_handler_h handlers[5] = {NULL, }; ServiceContext ctx = {0,}; diff --git a/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc b/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc index 32f7d11..d6664cc 100644 --- a/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc +++ b/org.tizen.aurum-bootstrap/src/Commands/PostCommand.cc @@ -1,7 +1,6 @@ #include "PostCommand.h" #include #include -#include PostCommand::PostCommand() : PostCommand(nullptr) {} PostCommand::PostCommand(Command *cmd) : mCommand{cmd} {} @@ -11,7 +10,7 @@ PostCommand::PostCommand(Command *cmd) : mCommand{cmd} {} ::grpc::Status rst = mCommand->execute(); LOG_SCOPE_F(INFO, "PostCommand --------------- "); mCommand->executePost(); - ecore_main_loop_thread_safe_call_sync([](void *data)->void*{return NULL;}, NULL); //FIXME : extract ecore dep from here + // do post-command return rst; } diff --git a/packaging/aurum.spec b/packaging/aurum.spec index 6b2030b..5684c8d 100644 --- a/packaging/aurum.spec +++ b/packaging/aurum.spec @@ -17,7 +17,7 @@ BuildRequires: at-spi2-core-devel BuildRequires: pkgconfig(capi-system-info) BuildRequires: pkgconfig(capi-ui-efl-util) BuildRequires: pkgconfig(elementary) -BuildRequires: gtest-devel +BuildRequires: pkgconfig(gmock) BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(capi-appfw-package-manager) @@ -29,6 +29,10 @@ BuildRequires: pkgconfig(libtzplatform-config) BuildRequires: pkgconfig(capi-system-system-settings) BuildRequires: pkgconfig(capi-base-utils-i18n) +%if 0%{?gcov:1} +BuildRequires: lcov +%endif + %if "%{?profile}" == "tv" %define __hash_signing 0 %else @@ -61,24 +65,48 @@ Requires: libgrpc %description bootstrap gRPC Server +%if 0%{?gcov:1} +%package gcov +Summary: Aurum - Ui Automation (gcov) +Group: Graphics & UI Framework/Testing +%description gcov +Ui Automation Library Aurum gcov objects +%endif + + %prep %setup -q cp %{SOURCE1001} . export LDFLAGS+="-Wl,-z,noexecstack" +%if "%{asan}" == "1" +%restore_fcommon +%endif + + +%if 0%{?gcov:1} +export CFLAGS+=" -fprofile-arcs -ftest-coverage " +export CXXFLAGS+=" -fprofile-arcs -ftest-coverage " +export FFLAGS+=" -fprofile-arcs -ftest-coverage" +export LDFLAGS+=" -lgcov" +%define TIZEN_GCOV true +%else +%define TIZEN_GCOV false +%endif + meson \ --prefix /usr \ --libdir %{_libdir} \ -Dcpp_std=c++17 \ -Dtizen=true \ + -Dtizen_gcov=%{TIZEN_GCOV} \ -Dtzapp_path=%{TZ_SYS_RO_APP} \ -Dtzpackage_path=%{TZ_SYS_RO_PACKAGES} \ gbsbuild 2>&1 | sed \ -e 's%^.*: error: .*$%\x1b[37;41m&\x1b[m%' \ -e 's%^.*: warning: .*$%\x1b[30;43m&\x1b[m%' - %build ninja \ -C gbsbuild \ @@ -99,10 +127,12 @@ ninja \ -e 's%^.*: error: .*$%\x1b[37;41m&\x1b[m%' \ -e 's%^.*: warning: .*$%\x1b[30;43m&\x1b[m%' -%install +%if 0%{?gcov:1} + mkdir -p gcov-obj + find . -name '*.gcno' -exec cp '{}' gcov-obj ';' +%endif -export DESTDIR=%{buildroot} -ninja -C gbsbuild install +%install %if 0%{?__hash_signing} %define tizen_sign 1 @@ -112,6 +142,14 @@ ninja -C gbsbuild install %define tizen_dist_sign 1 %endif +export DESTDIR=%{buildroot} +ninja -C gbsbuild install + +%if 0%{?gcov:1} +mkdir -p %{buildroot}%{_datadir}/gcov/obj +install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj +%endif + %post sbin/ldconfig @@ -123,12 +161,10 @@ sbin/ldconfig echo "signing %{TZ_SYS_RO_APP}/org.tizen.aurum-bootstrap" /usr/bin/signing-client/hash-signer-client.sh -a -d -p platform %{TZ_SYS_RO_APP}/org.tizen.aurum-bootstrap %endif -#chsmack -e "User" %{_bindir}/aurum_bootstrap %postun bootstrap /sbin/ldconfig - %files %manifest %{name}.manifest %defattr(-,root,root) @@ -145,8 +181,14 @@ echo "signing %{TZ_SYS_RO_APP}/org.tizen.aurum-bootstrap" %manifest %{name}.manifest %defattr(-,root,root) %license COPYING -#%{_bindir}/aurum_bootstrap -#%{_unitdir_user}/aurum-bootstrap.service %{TZ_SYS_RO_PACKAGES}/org.tizen.aurum-bootstrap.xml %{TZ_SYS_RO_APP}/org.tizen.aurum-bootstrap/* +%if 0%{?gcov:1} +%files gcov +%{_datadir}/gcov/obj/* +%{_bindir}/gtest_aurum +%else +%exclude %{_bindir}/gtest_aurum +%endif + diff --git a/tests/meson.build b/tests/meson.build index cddd449..cb55e09 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -7,15 +7,16 @@ test_inc = [ ] test_deps = [ - dependency('gtest', main:true), + dependency('gmock', main:true), libaurum, ] -test_bin = executable('ua_test', test_src, +test_bin = executable('gtest_aurum', test_src, include_directories: test_inc, dependencies: test_deps, pie:true, + install:get_option('tizen_gcov'), ) -test('ua test', test_bin) +test('gtest_aurum', test_bin) -- 2.7.4