Add opengles feature "NOT_SUPPORTED" and utc for Application 03/36703/12
authortaeyoon <taeyoon0.lee@samsung.com>
Thu, 12 Mar 2015 05:39:48 +0000 (14:39 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Wed, 18 Mar 2015 08:16:04 +0000 (17:16 +0900)
Change-Id: I3ffa8165fe95006816243215b1e04424dc8ea78e

adaptors/tizen/framework-tizen.cpp
automated-tests/src/dali-adaptor/CMakeLists.txt
automated-tests/src/dali-adaptor/utc-Dali-Application.cpp [new file with mode: 0644]
build/tizen/adaptor/Makefile.am
build/tizen/configure.ac
packaging/dali-adaptor-mobile.spec
packaging/dali-adaptor.spec

index 5cca1cd04af7d551afaa3c96edf17a1bee2395a1..281ddab1ee099ca265db2a19461267060258203b 100644 (file)
 #include <bundle.h>
 #include <Ecore.h>
 
+#ifdef OVER_TIZEN_SDK_2_2
+#include <system_info.h>
+#endif
+
 #include <dali/integration-api/debug.h>
 
 // INTERNAL INCLUDES
@@ -266,6 +270,18 @@ Framework::Framework(Framework::Observer& observer, int *argc, char ***argv, con
   mAbortHandler( MakeCallback( this, &Framework::AbortCallback ) ),
   mImpl(NULL)
 {
+
+#ifdef OVER_TIZEN_SDK_2_2
+  bool featureFlag = true;
+  system_info_get_platform_bool( "tizen.org/feature/opengles.version.2_0", &featureFlag );
+
+  if( featureFlag == false )
+  {
+    set_last_result( TIZEN_ERROR_NOT_SUPPORTED );
+    throw Dali::DaliException( "", "OpenGL ES 2.0 is not supported." );
+  }
+#endif
+
   InitThreads();
   mImpl = new Impl(this);
 }
index 91b6509063183e0f4b305fafe03afc47ce3f832a..89be323eefb28b4aa147ffbe90881b594a7ab277 100644 (file)
@@ -8,6 +8,7 @@ SET(TC_SOURCES
     utc-Dali-Key.cpp
     utc-Dali-SingletonService.cpp
     utc-Dali-Timer.cpp
+    utc-Dali-Application.cpp
 )
 
 LIST(APPEND TC_SOURCES
diff --git a/automated-tests/src/dali-adaptor/utc-Dali-Application.cpp b/automated-tests/src/dali-adaptor/utc-Dali-Application.cpp
new file mode 100644 (file)
index 0000000..3a66950
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include <dali/dali.h>
+#include <dali-test-suite-utils.h>
+
+using namespace Dali;
+
+void utc_dali_application_startup(void)
+{
+  test_return_value = TET_UNDEF;
+}
+
+void utc_dali_application_cleanup(void)
+{
+  test_return_value = TET_PASS;
+}
+
+namespace
+{
+
+struct MyTestApp : public ConnectionTracker
+{
+  MyTestApp( Application& app)
+  : initCalled( false ),
+    application( app )
+  {
+    application.InitSignal().Connect( this, &MyTestApp::Create );
+  }
+
+  void Create(Application& app)
+  {
+    initCalled = true;
+  }
+
+  void Quit()
+  {
+    application.Quit();
+  }
+
+  // Data
+  bool initCalled;
+  Application& application;
+};
+
+} // unnamed namespace
+int UtcDaliApplicationNew(void)
+{
+  Application application = Application::New();
+
+  MyTestApp testApp( application );
+
+  DALI_TEST_CHECK( application );
+
+  END_TEST;
+}
index f867b663f7b00e54befacf5c4bd15d72174a7621..36460210802d36b0cc9513b03201b156e42334bd 100644 (file)
@@ -228,6 +228,7 @@ libdali_adaptor_la_CXXFLAGS = \
                       $(FONTCONFIG_CFLAGS) \
                       $(PNG_CFLAGS) \
                       $(CAPI_APPFW_APPLICATION_CFLAGS) \
+                      $(CAPI_SYSTEM_INFO_CFLAGS) \
                       $(ELEMENTARY_CFLAGS) \
                       $(EVAS_CFLAGS) \
                       $(ECORE_CFLAGS) \
@@ -264,6 +265,7 @@ libdali_adaptor_la_LIBADD = \
                       $(LIBCURL_LIBS) \
                       $(CAPI_SYSTEM_SYSTEM_SETTINGS_LIBS) \
                       $(CAPI_APPFW_APPLICATION_LIBS) \
+                      $(CAPI_SYSTEM_INFO_LIBS) \
                       -lgif \
                       -lboost_thread
 
index e82b21985f67fa19910c1ba54be06a0904efebb8..6cfa86b9704f6ae66381e30c2c6f02735de13ca1 100644 (file)
@@ -131,6 +131,12 @@ AC_ARG_WITH([jpeg-turbo],
 
 AM_CONDITIONAL(TURBO_JPEG_IS_ON, test $with_jpeg_turbo = yes)
 
+AC_ARG_WITH([over-tizen_2_2],
+            [AC_HELP_STRING([--with-over-tizen_2_2],
+                            [Use tizen API over ver. 2.2])],
+            [with_over_tizen_2_2=yes],
+            [with_over_tizen_2_2=no])
+
 # Tizen Profile options
 AC_ARG_ENABLE([profile],
               [AC_HELP_STRING([--enable-profile=COMMON,MOBILE,WEARABLE,TV,UBUNTU],
@@ -170,8 +176,13 @@ PKG_CHECK_MODULES(SENSOR, sensor)
 PKG_CHECK_MODULES(TTS, tts)
 PKG_CHECK_MODULES(VCONF, vconf)
 PKG_CHECK_MODULES(CAPI_SYSTEM_SYSTEM_SETTINGS, capi-system-system-settings)
+
+if test "x$with_over_tizen_2_2" = "xyes"; then
+PKG_CHECK_MODULES(CAPI_SYSTEM_INFO, capi-system-info)
 fi
 
+fi # ubuntu profile test
+
 if test "x$enable_wayland" = "xyes"; then
 PKG_CHECK_MODULES(WAYLAND, [ecore-wayland egl wayland-egl wayland-client >= 1.2.0 xkbcommon],
                   [DALI_HAS_ECOREWL=yes],
@@ -287,4 +298,5 @@ Configuration
   Font Path (Downloaded):           $fontDownloadedPath
   Font Path (Application):          $fontApplicationPath
   Font Configuration File:          $fontConfigurationFilePath
+  OVERTIZEN2.2:                     $with_over_tizen_2_2
 "
index 448994b6e0e1f6ae6bead43163b18e17ad13c005..f8682d646033d150ac5a41843ed08cce3c4a8729 100644 (file)
@@ -9,9 +9,9 @@ Source0:    %{name}-%{version}.tar.gz
 
 %define dali_profile MOBILE
 %define dali_mobile_profile 1
-%define dali_feedback_plugin 1
-%define dali_bullet_plugin 1
-%define dali_assimp_plugin 1
+%define dali_feedback_plugin 0
+%define dali_bullet_plugin 0
+%define dali_assimp_plugin 0
 %define over_tizen_2_2 1
 
 %if 0%{?over_tizen_2_2}
@@ -51,6 +51,10 @@ BuildRequires:  pkgconfig(opengl-es-20)
 BuildRequires:  pkgconfig(efl-assist)
 BuildRequires:  libcurl-devel
 
+%if 0%{?over_tizen_2_2}
+BuildRequires:  pkgconfig(capi-system-info)
+%endif
+
 %if 0%{?dali_assimp_plugin}
 BuildRequires:  pkgconfig(assimp)
 %endif
@@ -153,6 +157,9 @@ FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION
 %endif
 %if 0%{?dali_assimp_plugin}
            --enable-assimp \
+%endif
+%if 0%{?over_tizen_2_2}
+           --with-over-tizen_2_2 \
 %endif
            --libdir=%{_libdir}
 
index 6dfbb0c5ca2dc654371f79d662e220a9ae556e0c..c45aba19c8834972923a38b13a45f56ce8549d48 100644 (file)
@@ -75,6 +75,11 @@ BuildRequires:  pkgconfig(glesv2)
 BuildRequires:  pkgconfig(egl)
 BuildRequires:  libcurl-devel
 
+
+%if 0%{?over_tizen_2_2}
+BuildRequires:  pkgconfig(capi-system-info)
+%endif
+
 %if %{with wayland}
 BuildRequires:  pkgconfig(ecore-wayland)
 BuildRequires:  pkgconfig(wayland-egl)
@@ -188,6 +193,9 @@ cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LD
 %endif
 %if 0%{?dali_assimp_plugin}
            --enable-assimp \
+%endif
+%if 0%{?over_tizen_2_2}
+           --with-over-tizen_2_2 \
 %endif
            $configure_flags --libdir=%{_libdir}