8 # test which classlibrary was used
9 # depending on whether classpath or openjdk class library was used we may expect different results from the tests, this may e.g.
10 # by simple things like intentation when printing stack traces or even more subtile stuff ...
12 $JAVA -XX:+PrintConfig 2>&1 | grep gnu.classpath.boot.library.path: > /dev/null
13 if [ $? -eq "0" ]; then
17 $JAVA -XX:+PrintConfig 2>&1 | grep sun.boot.library.path > /dev/null
18 if [ $? -eq "0" ]; then
23 if [ -z $POSTFIX ]; then
24 echo "Warning: Could not detect classlibrary the java VM uses, assuming openJDK"
28 # mostly classpath and openjdk deliver same results
29 REFERENCE_OUTPUT=$SRCDIR/$TEST.output
30 REFERENCE_2OUTPUT=$SRCDIR/$TEST.2output
32 # if they do not exist, we try the postfixed versions
33 if [ ! -f $REFERENCE_OUTPUT ]; then
34 REFERENCE_OUTPUT=$SRCDIR/$TEST.output.$POSTFIX
36 if [ ! -f $REFERENCE_2OUTPUT ]; then
37 REFERENCE_2OUTPUT=$SRCDIR/$TEST.2output.$POSTFIX
42 $JAVA $TEST > $TEST.thisoutput 2>&1
44 if [ $? -eq "0" ]; then
46 if [ -f $REFERENCE_2OUTPUT ]; then
47 # Error should have been returned
48 echo "OK, but wrong return value: $?"
53 cmp -s $REFERENCE_OUTPUT $TEST.thisoutput
55 if [ $? -eq "0" ]; then
59 diff -u $REFERENCE_OUTPUT $TEST.thisoutput
64 if [ ! -f $REFERENCE_2OUTPUT ]; then
65 # No Error should have been returned
66 echo "FAILED, but wrong return value: $?"
67 head $TEST.this2output
71 cmp -s $REFERENCE_2OUTPUT $TEST.thisoutput
73 if [ $? -eq "0" ]; then
77 diff -u $REFERENCE_2OUTPUT $TEST.thisoutput
81 rm -f $TEST.thisoutput