Add test script for quick testing for home tizen studio. 01/273401/1
authorvarinder.p <varinder.p@samsung.com>
Sat, 19 Mar 2022 02:11:44 +0000 (07:41 +0530)
committerVarinder Pratap Singh <varinder.p@samsung.com>
Tue, 5 Apr 2022 08:29:26 +0000 (13:59 +0530)
Change-Id: I731c3d2e8a5210def12b7a02a2939b9f79d0ece8
Signed-off-by: varinder.p <varinder.p@samsung.com>
12 files changed:
.gitmodules
configure
hw/yagl/yagl_drivers/egl_wgl/yagl_egl_wgl.c
hw/yagl/yagl_log.h
package/build.common
package/build.linux
package/build.windows
test_tizen_emulator.sh [new file with mode: 0755]
tizen/emulator_configure.sh
tizen/src/hw/maru_board.c
tizen/src/ui/displayglwidget.cpp
tizen/src/ui/qt5_supplement.cpp

index 584f8296712b351bde0a61881b02e9f9325473ed..9c0501a4d4e4ba73c07c423ea9d9ed0884c6d333 100644 (file)
@@ -49,6 +49,9 @@
 [submodule "roms/edk2"]
        path = roms/edk2
        url = https://git.qemu.org/git/edk2.git
+[submodule "slirp"]
+       path = slirp
+       url = https://git.qemu.org/git/libslirp.git
 [submodule "roms/opensbi"]
        path = roms/opensbi
        url =   https://git.qemu.org/git/opensbi.git
index 3ddc33ad7532642666fe60fcb9b686a41ecaa014..f03100329c4a11eaa67c524aca663098205ae2ec 100755 (executable)
--- a/configure
+++ b/configure
@@ -624,7 +624,7 @@ QEMU_CFLAGS="-fno-strict-aliasing -fno-common -fwrapv -std=gnu99 $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS"
 QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS"
 QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLAGS"
-QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote \$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include"
+QEMU_INCLUDES="-iquote . -iquote \$(SRC_PATH) -iquote \$(SRC_PATH)/accel/tcg -iquote \$(SRC_PATH)/include -isystem $PWD" 
 QEMU_INCLUDES="$QEMU_INCLUDES -iquote \$(SRC_PATH)/disas/libvixl"
 if test "$debug_info" = "yes"; then
     CFLAGS="-g $CFLAGS"
@@ -925,7 +925,7 @@ Linux)
   linux="yes"
   linux_user="yes"
   kvm="yes"
-  QEMU_INCLUDES="-isystem \$(SRC_PATH)/linux-headers -isystem $PWD/linux-headers -isystem $PWD $QEMU_INCLUDES"
+  QEMU_INCLUDES="-isystem \$(SRC_PATH)/linux-headers -isystem $PWD/linux-headers $QEMU_INCLUDES"
   supported_os="yes"
   libudev="yes"
 ;;
index 09599fdccb5b8d52619c876e4347fcfccaff3fdf..51ce2a12572b1e61888d41ed37dfd748615537de 100644 (file)
  *
  */
 
-#include <windows.h>
+#include "yagl_types.h"
 #include <wingdi.h>
 #include <GL/gl.h>
 #include <GL/wglext.h>
-#include <glib.h>
 #include "yagl_egl_driver.h"
 #include "yagl_dyn_lib.h"
 #include "yagl_log.h"
index 4479108f580f9876113242b99a99729d799f6bf7..b05e92f562489f091fe043190ac816f41461530a 100644 (file)
 #ifndef _QEMU_YAGL_LOG_H
 #define _QEMU_YAGL_LOG_H
 
-#ifdef _WIN32
-#include <windows.h>
-#endif
-
 #include "yagl_types.h"
 
 //#define YAGL_LOG_DISABLE
index 8e1ccd442ee497990d6058c6e528b1c984e223dd..215629c054b3bcc53f861a6372f0a6585c0e6714 100644 (file)
@@ -43,6 +43,7 @@ build_common()
 install_common()
 {
        TIZEN_VERSIONS="6.5 6.0 5.0 4.0 3.0 2.4 2.3.2"
+       QEMU_VERSION=`cat ${SRCDIR}/package/pkginfo.manifest | grep Version | awk -F: '{print $2}' | xargs`
 
        for VER in ${TIZEN_VERSIONS} ; do
                # emulator
@@ -74,5 +75,10 @@ install_common()
                        # Now it is not necessary. Uncomment the line below if necessary.
                        #sed -i'' -e "s/tizen-x.x/tizen-$VER/g" "$TARTGET_INSTALL_FILE"
                fi
+
+               echo "Removing old builds: " $VER-emulator-qemu-x86_${QEMU_VERSION}_${TARGET_OS}.zip
+               rm -f ${SRCDIR}/$VER-emulator-qemu-x86_${QEMU_VERSION}_${TARGET_OS}.zip
+               rm -f ${SRCDIR}/$VER-emulator-common-x86_${QEMU_VERSION}_${TARGET_OS}.zip
+
        done
 }
index 164aa062cd841847706beb6538a4937ed3680af8..fad94e72e653b291c43a7ef8c84f9ed996f961bc 100755 (executable)
@@ -31,6 +31,9 @@ prepare()
                # mingw-x doesn't have zlib, so we use our own.
                export EXTRA_CFLAGS=-I${ROOTDIR}/include
                export EXTRA_LDFLAGS=-L${ROOTDIR}/lib
+
+               echo "check SRCDIR:" $SRCDIR
+               cd $SRCDIR
        else
                # for linux target
 
index ce258aaba5c60e494987fee2d95461054d2a5fb7..78cf693257d16ea54b19fc5046a425297631d2a3 100755 (executable)
@@ -10,7 +10,7 @@ prepare()
        PYTHON_DIR=`env | grep PATH | grep Python`
        if [ "$PYTHON_DIR" = "" ]
        then
-               echo "Make sure that you have installed Python 2.x version"
+               echo "Make sure that you have installed Python 3.x version"
                echo "and then set installed Python/bin path into PATH system variable on your PC!"
                exit 1
        fi
diff --git a/test_tizen_emulator.sh b/test_tizen_emulator.sh
new file mode 100755 (executable)
index 0000000..9f9c132
--- /dev/null
@@ -0,0 +1,47 @@
+#!/bin/bash -xe
+#!/bin/sh -xe
+
+# test
+test() 
+{
+    TIZEN_PLATFORM_VER="6.5"
+    QEMU_VERSION="5.0.1.2"
+    BUILD_TARGET="ubuntu-64"
+    # emulator
+    EMULATOR_COMMON_DIR=./package/$TIZEN_PLATFORM_VER-emulator-qemu-common.package.${TARGET_OS}/data/platforms/tizen-$TIZEN_PLATFORM_VER/common
+    # we have nothing for common now
+    EMULATOR_X86_DIR=./package/$TIZEN_PLATFORM_VER-emulator-qemu-x86.package.${TARGET_OS}/data/platforms/tizen-$TIZEN_PLATFORM_VER/common
+    mkdir -p ./tizen_test_binaries/
+
+    UNZIP_PATH=`which unzip`
+    if $UNZIP_PATH==""
+    then
+        echo "Install unzip utility"
+        echo "sudo apt install unzip"
+        exit
+    fi
+
+    $UNZIP_PATH $TIZEN_PLATFORM_VER-emulator-qemu-x86_${QEMU_VERSION}_${BUILD_TARGET}.zip -d ./tizen_test_binaries/
+    # Save orignal emulator.
+    cp -pPR $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator_ORGINAL 
+    
+    cp -pPR ./tizen_test_binaries/data/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/ 
+
+    # kill existing emulator manager
+    #pkill -f emulator-manager
+
+    BASH_BIN=`which bash`
+       # Launch Tizen Emulator
+    echo "Launch Tizen Emulator.."
+    $BASH_BIN $HOME/tizen-studio/tools/emulator/bin/emulator-manager
+}
+
+
+test
+
+echo "cleaning up.."
+rm -rf $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator
+mv $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator_ORGINAL $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator
+rm -rf $HOME/tizen-studio/platforms/tizen-$TIZEN_PLATFORM_VER/common/emulator_ORGINAL
+rm -rf ./tizen_test_binaries/
+echo "test success"
index cb8db9a212904aa0c87211c42d36c2f32091694a..b82238fa9a17e13757b2a5135b773897dc6c2809 100755 (executable)
@@ -129,7 +129,7 @@ CONFIGURE_APPEND="
  --enable-qt
  --disable-libav
  --enable-libpng
- --enable-virtfs
+ --disable-virtfs
  --disable-bzip2
  --disable-curl
  --disable-lzo
@@ -143,6 +143,8 @@ CONFIGURE_APPEND="
  --disable-spice
  --disable-curses
  --disable-xen
+ --disable-tpm
+ --disable-sdl
  --disable-sheepdog
  --enable-debug
  --enable-debug-info
@@ -153,7 +155,6 @@ CONFIGURE_APPEND_WIN="
  --extra-ldflags=-static-libstdc++
  --audio-drv-list=dsound
  --winver=0x0600
- --enable-sdl
  --enable-hax"
 
 # append platform specific options
@@ -219,4 +220,3 @@ echo "##### QEMU configuring for emulator"
 echo "##### QEMU configure append:" $CONFIGURE_APPEND
 echo "\nConfigure directory:" ${PWD}
 exec ../configure $CONFIGURE_APPEND
-
index ea5798c4ddc1db019ac6f0259750d1a06bb4634f..99eadff06d6fb66398c04d19458263426e027169 100644 (file)
@@ -48,13 +48,6 @@ static void maru_x86_board_init(MachineState *machine)
     maru_device_init();
 }
 
-#define HAX_HW_COMPAT_2_6 \
-    {\
-        .driver   = "virtio-pci",\
-        .property = "disable-modern",\
-        .value    = "on",\
-    },
-
 static void maru_x86_machine_options(MachineClass *m)
 {
     m->family = "pc_piix";
@@ -67,9 +60,9 @@ static void maru_x86_machine_options(MachineClass *m)
     m->no_cdrom = 1;
     m->no_sdcard = 1;
     m->default_boot_order = "c";
-#ifdef CONFIG_HAX
-    SET_MACHINE_COMPAT(m, HAX_HW_COMPAT_2_6);
-#endif
+#ifdef CONFIG_HAX    
+    compat_props_add(m->compat_props, hw_compat_2_6, hw_compat_2_6_len);
+#endif //CONFIG_HAX
 }
 
 DEFINE_PC_MACHINE(maru, "maru-x86-machine", maru_x86_board_init,
index 0d64858b7647dd8fb27783dd08927ad4b8ff6c51..a9d33929ca598ce65158929f0ac7cc033d69a3b7 100644 (file)
  *
  */
 
-#include <QtOpenGL>
-#include <QOpenGLShaderProgram>
-#include "displayglwidget.h"
-#include "input/multitouchtracker.h"
-
 extern "C" {
 #define QObject qemu_QObject
 #define QList qemu_QList
 //declare _Static_assert as there is none for cpp file in qemu 
-#define _Static_assert(x , msg) Q_ASSERT_X(x , "tizen/ui/displayglwidget.o", msg) 
+#define _Static_assert(x , msg) //Q_ASSERT_X(x , "tizen/ui/displayglwidget.o", msg) 
 #include "qemu/osdep.h"
 #include "qemu/thread.h"
 #undef QObject
 #undef QList
+}
 
+#include <QtOpenGL>
+#include <QOpenGLShaderProgram>
+#include "displayglwidget.h"
+#include "input/multitouchtracker.h"
+
+extern "C" {
 extern uint32_t brightness_level;
 extern bool display_off;
 extern uint8_t brightness_tbl[];
index 44abe4e21bde54757a906ede94f085093902a75f..bc3e44fd99a23ab1f4c695a455cc2d026953c922 100644 (file)
  *
  */
 
-
+extern "C" {
+#define QObject qemu_QObject
+#define QList qemu_QList
+#include "qemu/osdep.h"
+#include "emul_state.h"
+#include "emulator_options.h"
+#undef QObject
+#undef QList
+}
 #include <QApplication>
 #include <QOpenGLContext>
 
@@ -45,9 +53,6 @@
 DECLARE_DEBUG_CHANNEL(qt5_ui);
 
 extern "C" {
-#include "qemu/osdep.h"
-#include "emul_state.h"
-#include "emulator_options.h"
 bool is_display_off(void);
 }