#include <string.h>
#include <iostream>
-#include "loguru.hpp"
+#include <loguru.hpp>
#include "config.h"
std::map<AtspiAccessible *, AccessibleNode *> AccessibleNode::mNodeMap{};
#include "AccessibleUtils.h"
-#include "loguru.hpp"
+#include <loguru.hpp>
#include <string.h>
char* state_to_char(AtspiStateType state)
#include <iostream>
#include <utility>
-#include "loguru.hpp"
+#include <loguru.hpp>
AtspiEventListener *AccessibleWatcher::listener = nullptr;
#include "Comparer.h"
-#include "loguru.hpp"
+#include <loguru.hpp>
Comparer::Comparer(const UiDevice *device, const std::shared_ptr<UiSelector> selector,
const bool &earlyReturn)
#include <stdlib.h>
#include <time.h>
-
#include <Ecore.h>
TizenImpl::TizenImpl()
#include <iostream>
#include <set>
-#include "loguru.hpp"
+#include <loguru.hpp>
bool PartialMatch::checkCriteria(const std::string *textA, const std::string textB)
{
#include <iostream>
#include <utility>
-#include "loguru.hpp"
+#include <loguru.hpp>
UiObject::UiObject() : UiObject(nullptr, nullptr, nullptr) {}
#include "ISearchable.h"
#include "UiObject.h"
-#include "loguru.hpp"
+#include <loguru.hpp>
Waiter::Waiter() : Waiter(nullptr) {}
#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
#endif
-#include "loguru.hpp"
+#include <loguru.hpp>
#ifndef LOGURU_HAS_BEEN_IMPLEMENTED
#define LOGURU_HAS_BEEN_IMPLEMENTED
else
message('')
endif
+if get_option('tizen_gcov') == true
+ config_h.set10('TIZEN_GCOV', true)
+endif
root_inc = include_directories('./')
value: false,
description: 'enable tizen specific dependancy'
)
+
option('tzapp_path',
type: 'string',
value: '/usr/apps/',
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
#!/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
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
class aurumServiceImpl final : public aurum::Bootstrap::Service {
public:
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class ClearCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class ClickCommand : public Command {
protected:
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class CloseAppCommand : public Command {
#include <gio/gio.h>
#include <grpcpp/grpcpp.h>
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class FindElementCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class FlickCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class GetAppInfoCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class GetAttributeCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class GetDeviceTimeCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class GetLocationCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class GetSizeCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class GetValueCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class InstallAppCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class KillServerCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class LaunchAppCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class LongClickCommand : public Command {
#include <gio/gio.h>
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class PostCommand : public Command {
#include <gio/gio.h>
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class PreCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class RemoveAppCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class SendKeyCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class SetValueCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class SyncCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class TouchDownCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class TouchMoveCommand : public Command {
#include <grpcpp/grpcpp.h>
#include "Commands/Command.h"
#include "ObjectMapper.h"
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "config.h"
class TouchUpCommand : public Command {
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
#include "Commands/PreCommand.h"
#include "config.h"
-#include "loguru.hpp"
+#include <loguru.hpp>
using namespace grpc;
using namespace aurum;
#include <gio/gio.h>
#include <grpcpp/grpcpp.h>
-#include "aurum.grpc.pb.h"
+#include <aurum.grpc.pb.h>
#include "AurumServiceImpl.h"
#include "config.h"
-#include "loguru.hpp"
+#include <loguru.hpp>
using namespace grpc;
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,};
#include "PostCommand.h"
#include <atspi/atspi.h>
#include <loguru.hpp>
-#include <Ecore.h>
PostCommand::PostCommand() : PostCommand(nullptr) {}
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;
}
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)
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
%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 \
-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
%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
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)
%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
+
]
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)