From 1b7fba6b6e1a53a36afaf72a152c468a4694402a Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Thu, 31 Jan 2013 11:38:54 +0100
Subject: JOAL Fixes: GlueGen, OpenAL Header, Added scripts/tests.sh,

- OpenAL Header
  - Unique declaration in al-types.h and alc-types.h, remove duplicates in al.h and alc.h
  - Use ALproc and ALCproc for opaque pointer return values

- GlueGen Fixes
  - Remove duplicates in extension classes ALExt and ALExtConstants
  - Push all common configurations to joal-common.cfg
  - Complete ArgumentIsString for ALC methods

- Added scripts/tests.sh for convenient manual testing of single unit test

-
---
 make/scripts/tests.sh | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 make/scripts/tests.sh

(limited to 'make/scripts')

diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
new file mode 100644
index 0000000..e7c4189
--- /dev/null
+++ b/make/scripts/tests.sh
@@ -0,0 +1,90 @@
+function print_usage() {
+    echo "Usage: $0 java-exe java-xargs joal-build-dir"
+    echo "e.g.: bash scripts/tests.sh `which java` -d64 ../build-x86_64"
+}
+    
+if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
+    print_usage
+    exit 0
+fi
+
+javaexe="$1"
+shift
+javaxargs=$1
+shift
+bdir=$1
+shift
+bdir_base=`basename $bdir`
+
+if [ ! -x "$javaexe" ] ; then
+    echo java-exe "$javaexe" is not an executable
+    print_usage
+    exit 1
+fi
+if [ ! -d $bdir ] ; then
+    echo build-dir $bdir is not a directory
+    print_usage
+    exit 1
+fi
+
+rm -f java-run.log
+
+spath=`dirname $0`
+
+unset CLASSPATH
+
+which "$javaexe" 2>&1 | tee -a java-run.log
+"$javaexe" -version 2>&1 | tee -a java-run.log
+
+GLUEGEN_DIR=$spath/../../../gluegen
+GLUEGEN_BDIR=$GLUEGEN_DIR/$bdir_base
+if [ ! -d $GLUEGEN_DIR -o ! -d $GLUEGEN_BDIR ] ; then
+    echo GLUEGEN not found
+    print_usage
+    exit
+fi
+JUNIT_JAR=$GLUEGEN_DIR/make/lib/junit.jar
+
+if [ -z "$ANT_PATH" ] ; then
+    ANT_PATH=$(dirname $(dirname $(which ant)))
+    if [ -e $ANT_PATH/lib/ant.jar ] ; then
+        export ANT_PATH
+        echo autosetting ANT_PATH to $ANT_PATH
+    fi
+fi
+if [ -z "$ANT_PATH" ] ; then
+    echo ANT_PATH does not exist, set it
+    print_usage
+    exit
+fi
+ANT_JARS=$ANT_PATH/lib/ant.jar:$ANT_PATH/lib/ant-junit.jar
+
+function jrun() {
+    #D_ARGS="-Djogamp.debug=all"
+    #D_ARGS="-Djogamp.debug.NativeLibrary=true -Djoal.debug=true"
+    #D_ARGS="-Djoal.debug=all"
+    #X_ARGS="-verbose:jni"
+    #X_ARGS="-Xrs"
+
+    export CLASSPATH=$GLUEGEN_BDIR/gluegen-rt.jar:$bdir/joal.jar:$bdir/joal-test.jar:$JUNIT_JAR:$ANT_JARS
+    echo CLASSPATH $CLASSPATH
+
+    echo
+    echo "Test Start: $*"
+    echo
+    echo "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $*
+    #gdb --args "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $*
+    "$javaexe" $javaxargs $X_ARGS $D_ARGS $C_ARG $*
+    echo
+    echo "Test End: $*"
+    echo
+}
+
+function testnormal() {
+    jrun $* 2>&1 | tee -a java-run.log
+}
+
+
+#testnormal com.jogamp.openal.test.manual.OpenALTest $*
+#testnormal com.jogamp.openal.test.manual.Sound3DTest $*
+testnormal com.jogamp.openal.test.junit.ALExtLoopbackDeviceSOFTTest $*
-- 
cgit v1.2.3