-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·72 lines (57 loc) · 1.72 KB
/
run.sh
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
#!/bin/sh
#
# You can set JAVA_HOME to point ot JDK 1.3
# or shell will try to deterine java location using which
#
#JAVA_HOME=/l/jdk1.3
#
# No need to modify anything after this line.
# --------------------------------------------------------------------
if [ -z "$JAVA_HOME" ] ; then
JAVA=`/usr/bin/which java`
if [ -z "$JAVA" ] ; then
echo "Cannot find JAVA. Please set your PATH."
exit 1
fi
JAVA_BIN=`dirname $JAVA`
JAVA_HOME=$JAVA_BIN/..
else
JAVA=$JAVA_HOME/bin/java
fi
#echo "JAVA= $JAVA"
#if [ ! "`$JAVA -version 2>&1 | grep "\ 1\.3"`" ]; then
if [ ! "`$JAVA -version 2>&1 | egrep "\ 1\.[3456789].*"`" ]; then
echo Required 1.3 verion of JDK: can not use $JAVA
echo Current version is:
$JAVA -version
exit 1
fi
#POLICY=-Djava.security.policy=${TOP}/src/tests/java.policy
#JAVA_OPTS="-Djavax.net.debug=ssl"
#JAVA_OPTS=-Debug=true
#JAVA_OPTS="$JAVA_OPTS -Djava.compiler=NONE"
JAVA_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.defaultlog=error"
#echo set required LOCALCLASSPATH
LOCALCLASSPATH=`/bin/sh $PWD/classpath.sh run`
MY_JAVA="$JAVA $JAVA_OPTS $JAVA_DEBUG_OPTS -cp $LOCALCLASSPATH"
if [ -z "$1" ] ; then
echo Please specify test name.
exit 1
fi
NAME=$1
shift
if [ "$NAME" = "registry" ] ; then
CMD="$MY_JAVA soaprmi.registry.RegistryImpl $*"
elif [ "$NAME" = "secure_registry" ] ; then
CMD="$MY_JAVA soaprmi.registry.SecureRegistryImpl $*"
elif [ "$NAME" = "hello_server" ] ; then
CMD="$MY_JAVA hello.HelloServer $*"
elif [ "$NAME" = "hello_client" ] ; then
CMD="$MY_JAVA hello.HelloClient $*"
elif [ "$NAME" = "junit" ] ; then
CMD="$MY_JAVA AllTests $*"
else
CMD="$MY_JAVA $NAME $*"
fi
echo $CMD
$CMD