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 5cca1cd..281ddab 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 91b6509..89be323 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 f867b66..3646021 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 e82b219..6cfa86b 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 448994b..f8682d6 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
@@ -154,6 +158,9 @@ FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION
 %if 0%{?dali_assimp_plugin}
            --enable-assimp \
 %endif
+%if 0%{?over_tizen_2_2}
+           --with-over-tizen_2_2 \
+%endif
            --libdir=%{_libdir}
 
 make %{?jobs:-j%jobs}
index 6dfbb0c..c45aba1 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)
@@ -189,6 +194,9 @@ cd %{_builddir}/%{name}-%{version}/build/tizen && CXXFLAGS=$CXXFLAGS LDFLAGS=$LD
 %if 0%{?dali_assimp_plugin}
            --enable-assimp \
 %endif
+%if 0%{?over_tizen_2_2}
+           --with-over-tizen_2_2 \
+%endif
            $configure_flags --libdir=%{_libdir}
 
 make %{?jobs:-j%jobs}