From: Umar Date: Tue, 3 Apr 2018 13:22:47 +0000 (+0100) Subject: Modified spec file to add support for tracing. X-Git-Tag: dali_1.3.19~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=02857b021c716bdc1685a23041e02ed08d562465 Modified spec file to add support for tracing. Change-Id: Ie61d351b3ac5dcb0e8a5a41185f42bad71e41d9f --- diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp index 0e640e7..8bb7176 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.cpp @@ -79,6 +79,11 @@ void TestApplication::Initialize() Dali::Integration::Log::LogFunction logFunction(&TestApplication::LogMessage); Dali::Integration::Log::InstallLogFunction(logFunction); + Dali::Integration::Trace::LogContextFunction logContextFunction(&TestApplication::LogContext); + Dali::Integration::Trace::InstallLogContextFunction( logContextFunction ); + + Dali::Integration::Trace::LogContext( true, "Test" ); + mCore->SceneCreated(); } @@ -88,6 +93,18 @@ TestApplication::~TestApplication() delete mCore; } +void TestApplication::LogContext( bool start, const char* tag ) +{ + if( start ) + { + fprintf(stderr, "INFO: Trace Start: %s", tag); + } + else + { + fprintf(stderr, "INFO: Trace End: %s", tag); + } +} + void TestApplication::LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message) { switch(level) diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h index 5c94252..747b488 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/test-application.h @@ -26,6 +26,7 @@ #include "test-render-controller.h" #include #include +#include namespace Dali { @@ -66,6 +67,7 @@ public: void Initialize(); virtual ~TestApplication(); static void LogMessage( Dali::Integration::Log::DebugPriority level, std::string& message ); + static void LogContext( bool start, const char* tag ); Dali::Integration::Core& GetCore(); TestPlatformAbstraction& GetPlatform(); TestRenderController& GetRenderController(); diff --git a/build/tizen/configure.ac b/build/tizen/configure.ac index 26be349..96c78cd 100755 --- a/build/tizen/configure.ac +++ b/build/tizen/configure.ac @@ -97,6 +97,10 @@ if test "x$enable_debug" = "xyes"; then DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -DDEBUG_ENABLED" fi +if test "x$enable_trace" = "xyes"; then + DALI_ADAPTOR_CFLAGS="$DALI_ADAPTOR_CFLAGS -DTRACE_ENABLED" +fi + if test "x$enable_debug" = "xno" -a "x$enable_exportall" = "xno"; then DALI_TOOLKIT_CFLAGS="$DALI_TOOLKIT_CFLAGS -fvisibility=hidden -DHIDE_DALI_INTERNALS" fi @@ -253,6 +257,7 @@ Configuration ------------- Prefix: $prefix Debug Build: $enable_debug + Trace Build: $enable_trace JavaScript support (V8 required) $build_javascript_plugin CSharp support $build_csharp_plugin Profile: $dali_profile diff --git a/packaging/dali-toolkit.spec b/packaging/dali-toolkit.spec index 7d1a025..bc3bef4 100644 --- a/packaging/dali-toolkit.spec +++ b/packaging/dali-toolkit.spec @@ -165,6 +165,9 @@ DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR %if 0%{?enable_debug} --enable-debug \ %endif +%if 0%{?enable_trace} + --enable-trace \ +%endif --enable-i18n=yes \ --enable-rename-so=no @@ -194,6 +197,9 @@ DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR %if 0%{?enable_debug} --enable-debug \ %endif +%if 0%{?enable_trace} + --enable-trace \ +%endif --enable-i18n=yes \ --enable-rename-so=no