aboutsummaryrefslogtreecommitdiffstats
path: root/make/scripts/adb-launch-main.sh
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-01-19 07:04:56 +0100
committerSven Gothel <[email protected]>2013-01-19 07:04:56 +0100
commit50f997557b91a2f014ef0c2ea848c5c326d0cfb2 (patch)
tree360dcb881196ad517b38d6ab9a694ec1abf10bb3 /make/scripts/adb-launch-main.sh
parent34687193484b2404d83eebf5d008b71d54e52286 (diff)
NEWT/Android: Full Lifecycle for WindowDriver; Using static ViewGroup; AWTRobotUtil: More tolerant for non AWT env.; Fix adb-launch-*
- NEWT/Android WindowDriver - Full Lifecycle, remove refs on closeNative() - Respect isFullscreen() - Using static ViewGroup if available and surface not ready, allows running from main() - AWTRobotUtil: More tolerant for non AWT env. - Check for NEWT first - Only use AWT iff available, which allows running on Android - Fix adb-launch-* - Launch main/junit tests
Diffstat (limited to 'make/scripts/adb-launch-main.sh')
-rw-r--r--make/scripts/adb-launch-main.sh66
1 files changed, 31 insertions, 35 deletions
diff --git a/make/scripts/adb-launch-main.sh b/make/scripts/adb-launch-main.sh
index e40cfeb11..12dcab1e4 100644
--- a/make/scripts/adb-launch-main.sh
+++ b/make/scripts/adb-launch-main.sh
@@ -2,15 +2,15 @@
export HOST_UID=jogamp
# jogamp02 - 10.1.0.122
-#export HOST_IP=10.1.0.122
-export HOST_IP=10.1.0.52
+export HOST_IP=10.1.0.122
+#export HOST_IP=10.1.0.52
export HOST_RSYNC_ROOT=PROJECTS/JOGL
export TARGET_UID=jogamp
#export TARGET_IP=panda02
-export TARGET_IP=jautab01
+export TARGET_IP=jautab03
export TARGET_ADB_PORT=5555
-export TARGET_ROOT=/data/projects
+export TARGET_ROOT=jogamp-test
export BUILD_DIR=../build-android-armv6
@@ -36,42 +36,38 @@ fi
#TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.gl2es1.gears.newt.TestGearsGL2ES1NEWT
TSTCLASS=com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT
+#D_FLAGS="\&newt.debug=all\&jogl.debug=all\&nativewindow.debug=all"
+#D_FLAGS="\&newt.debug=all\&jogl.debug=all"
+D_FLAGS="\&newt.debug=all"
+
+#Screen: 1280 x 752
+#M_FLAGS="\&arg=-time\&arg=100000\&arg=-width\&arg=1280\&arg=-height\&arg=752"
+M_FLAGS="\&arg=-time\&arg=100000\&arg=-fullscreen"
+
LOGFILE=`basename $0 .sh`.log
-RSYNC_EXCLUDES="--delete-excluded \
- --exclude 'build-x86*/' --exclude 'build-linux*/' --exclude 'build-win*/' --exclude 'build-mac*/' \
- --exclude 'classes/' --exclude 'src/' --exclude '.git/' --exclude '*-java-src.zip' \
- --exclude 'gensrc/' --exclude 'doc/' --exclude 'jnlp-files' --exclude 'archive/' \
- --exclude 'android-sdk/' --exclude 'resources/' --exclude 'scripts/' \
- --exclude 'stub_includes/' --exclude 'nbproject/' --exclude '*.log' --exclude '*.zip' --exclude '*.7z' \
- --exclude 'make/lib/external/'"
+#adb -s $TARGET_IP:$TARGET_ADB_PORT uninstall jogamp.android.launcher
+#adb -s $TARGET_IP:$TARGET_ADB_PORT uninstall com.jogamp.common
+#adb -s $TARGET_IP:$TARGET_ADB_PORT install $BUILD_DIR/jogamp-android-launcher.apk
+#adb -s $TARGET_IP:$TARGET_ADB_PORT install $BUILD_DIR/gluegen-rt-android-armeabi.apk
-echo "#! /system/bin/sh" > $BUILD_DIR/jogl-targetcommand.sh
+#adb -s $TARGET_IP:$TARGET_ADB_PORT uninstall javax.media.opengl
+#adb -s $TARGET_IP:$TARGET_ADB_PORT install $BUILD_DIR/jar/jogl-all-android-armeabi.apk
-echo "\
-rsync -av --delete --delete-after $RSYNC_EXCLUDES \
- $HOST_UID@$HOST_IP::$HOST_RSYNC_ROOT/gluegen \
- $HOST_UID@$HOST_IP::$HOST_RSYNC_ROOT/jogl \
- $TARGET_ROOT ; \
-cd $TARGET_ROOT/jogl/make ;
-export LD_LIBRARY_PATH=/system/lib:$TARGET_ROOT/gluegen/make/$BUILD_DIR/obj:$TARGET_ROOT/jogl/make/$BUILD_DIR/lib ; \
-# export BOOTCLASSPATH=/system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar ;
-setprop log.redirect-stdio true ; setprop log.redirect-stderr true ; \
-am start -a android.intent.action.MAIN -n jogamp.android.launcher/jogamp.android.launcher.MainLauncher -d launch://jogamp.org/$TSTCLASS/?pkg=com.jogamp.opengl.test\&newt.debug=all\&jogl.debug=all\&nativewindow.debug=all \
-# \
-#dalvikvm \
-# -Xjnigreflimit:2000 \
-# -cp ../../gluegen/make/$BUILD_DIR/jogamp.android-launcher.apk:../../gluegen/make/lib/ant-junit-all.apk:../../gluegen/make/$BUILD_DIR/gluegen-rt-android-armeabi.apk:$BUILD_DIR/jar/jogl.all-android-armeabi.apk:$BUILD_DIR/jar/jogl.test.apk \
-# -Dgluegen.root=../../gluegen \
-# -Drootrel.build=build-android-armv6 \
-# com.android.internal.util.WithFramework \
-# $TSTCLASS \
-" >> $BUILD_DIR/jogl-targetcommand.sh
+#adb -s $TARGET_IP:$TARGET_ADB_PORT uninstall com.jogamp.opengl.test
+#adb -s $TARGET_IP:$TARGET_ADB_PORT install $BUILD_DIR/jar/jogl-test-android.apk
+SHELL_CMD="\
+cd /sdcard ; \
+if [ -e $TARGET_ROOT ] ; then rm -r $TARGET_ROOT ; fi ; \
+mkdir $TARGET_ROOT ; cd $TARGET_ROOT ; \
+setprop log.redirect-stdio true ; setprop log.redirect-stderr true ; \
+am kill-all ; \
+am start -W -S -a android.intent.action.MAIN -n jogamp.android.launcher/jogamp.android.launcher.MainLauncher -d launch://jogamp.org/$TSTCLASS/?pkg=com.jogamp.opengl.test$D_FLAGS$M_FLAGS \
+"
-chmod ugo+x $BUILD_DIR/jogl-targetcommand.sh
adb connect $TARGET_IP:$TARGET_ADB_PORT
-adb -s $TARGET_IP:$TARGET_ADB_PORT push $BUILD_DIR/jogl-targetcommand.sh $TARGET_ROOT/jogl-targetcommand.sh
-adb -s $TARGET_IP:$TARGET_ADB_PORT shell su -c $TARGET_ROOT/jogl-targetcommand.sh 2>&1 | tee $LOGFILE
-
+adb -s $TARGET_IP:$TARGET_ADB_PORT logcat -c
+adb -s $TARGET_IP:$TARGET_ADB_PORT shell $SHELL_CMD 2>&1 | tee $LOGFILE
+adb -s $TARGET_IP:$TARGET_ADB_PORT logcat -d 2>&1 | tee -a $LOGFILE