blob: c53f48776ca8cce55f2de4ec61bea91f8f23cc67 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
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.Bitstream"
#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/jar/joal.jar:$bdir/jar/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.ALutWAVLoaderTest $*
#testnormal com.jogamp.openal.test.junit.ALExtLoopbackDeviceSOFTTest $*
|