-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathd.sh
More file actions
executable file
·214 lines (185 loc) · 7.27 KB
/
Copy pathd.sh
File metadata and controls
executable file
·214 lines (185 loc) · 7.27 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
#!/bin/bash
#
# Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version
# 2 only, as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License version 2 for more details (a copy is
# included at /legal/license.txt).
#
# You should have received a copy of the GNU General Public License
# version 2 along with this work; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
#
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
# Clara, CA 95054 or visit www.sun.com if you need additional
# information or have any questions.
#
#----------------------------------------------------------#
# Setup environment #
#----------------------------------------------------------#
if [ ! -f d ]; then
if [ -z "`uname | grep 'Windows'`" ]; then
ln -s d.sh d
ln -s d_g.sh d_g
chmod +x `find . -name '*.sh'`
fi
fi
if [ -z "$JAVA_HOME" ]; then
JAVA_HOME=`which java`
JAVA_HOME=`dirname $JAVA_HOME`
JAVA_HOME=`dirname $JAVA_HOME`
fi
#echo "JAVA_HOME=$JAVA_HOME"
#-client -XX:+PrintCompilation
#builder="${JAVA_HOME}/bin/java $EXTRA_BUILDER_VMFLAGS -XX:CompileCommand=exclude,com/sun/squawk/Method.getParameterTypes -XX:CompileCommand=exclude,com/sun/squawk/SymbolParser.getSignatureTypeAt -XX:CompileCommand=exclude,com/sun/squawk/SymbolParser.stripMethods -Xms128M -Xmx384M -jar build.jar $BUILDER_FLAGS"
builder="${JAVA_HOME}/bin/java $EXTRA_BUILDER_VMFLAGS -Xms128M -Xmx384M -jar build.jar $BUILDER_FLAGS"
echo $builder
#----------------------------------------------------------#
# Rebuild the builder #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xbuilder" ]; then
cd builder;
./bld.sh $JAVA_HOME
cd ..
exit
fi
#----------------------------------------------------------#
# Rebuild the CSystem.dll #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xcsystem" ]; then
cl "/I${JAVA_HOME}\include" "/I${JAVA_HOME}\include\win32" /c \
prototypecompiler/src/com/sun/squawk/compiler/jni/CSystem.c \
prototypecompiler/src/com/sun/squawk/compiler/jni/dispatch_x86.c
link /nologo /debug /dll /out:CSystem.dll CSystem.obj dispatch_x86.obj
exit
fi
#----------------------------------------------------------#
# Launch Squawk in SDA #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xsda" ]; then
shift
eval squawk -verbose com.sun.squawk.debugger.sda.SDA $*
exit
fi
#----------------------------------------------------------#
# Run CLDC TCK 1.0a Static Signature Test #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xsigtest10a" ]; then
if [ "X$TCK10a_DIR" = "X" ]; then
echo "Need to set TCK10a_DIR variable to base dir of CLDC TCK 1.0a"
exit 1
fi
cmd="java -cp $TCK10a_DIR/javatest.jar:$TCK10a_DIR/sigtest.jar javasoft.sqe.tests.api.signaturetest.cldc.CLDCSignatureTest -TestURL file:$TCK10a_DIR/tests/api/signaturetest/ -Classpath cldc/j2meclasses"
echo $cmd
eval $cmd
exit
fi
#----------------------------------------------------------#
# Run CLDC TCK 1.1 Static Signature Test #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xsigtest11" ]; then
if [ "X$TCK11_DIR" = "X" ]; then
TCK11_DIR=../Squawk-tck/CLDC-TCK_11
if [ ! -d $TCK11_DIR ]; then
echo "Need to set TCK11_DIR variable to base dir of CLDC TCK 1.1"
exit 1
fi
fi
cmd="java -jar $TCK11_DIR/lib/sigtest.jar -TCK_ROOT file:$TCK11_DIR -Classpath cldc/j2meclasses"
echo $cmd
eval $cmd
exit
fi
#----------------------------------------------------------#
# Start the JavaTest UI #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xjavatest11" ]; then
if [ "X$TCK11_DIR" = "X" ]; then
TCK11_DIR=../Squawk-tck/CLDC-TCK_11
if [ ! -d $TCK11_DIR ]; then
echo "Need to set TCK11_DIR variable to base dir of CLDC TCK 1.1"
exit 1
fi
fi
cmd="java -jar $TCK11_DIR/lib/javatest.jar"
echo $cmd
eval $cmd
exit
fi
#----------------------------------------------------------#
# Run IMP TCK 1.0 Static Signature Teste #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Ximpsigtest10" ]; then
TCK_DIR=../Squawk-tck/IMP-TCK_10
if [ ! -d $DIR ]; then
echo "Cannot find $TCK_DIR"
exit 1
fi
cmd="java -jar $TCK_DIR/lib/sigtest.jar -TCK_ROOT file:$TCK_DIR -Classpath cldc/j2meclasses -Package javax"
echo $cmd
eval $cmd
exit
fi
#----------------------------------------------------------#
# Rebuild the native methods #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xnmethods" ]; then
eval $builder cldc
cd builder;
./nbld.sh
cd ..
eval $builder clean
eval $builder cldc
exit
fi
#----------------------------------------------------------#
# Macros for Andrew's demo #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xserver" ]; then
cmd="squawk -verbose -cp:samples/j2meclasses example.shell.LookupServer -verbose -loadbalance:ManyBalls"
echo $cmd
$cmd
exit
fi
if [ $# -gt 0 -a "X$1" = "Xshell" ]; then
localhost=""
if [ $# -gt 2 ]; then
localhost=",$3"
fi
cmd="squawk -verbose -cp:samples/j2meclasses example.shell.Main -verbose -register:$2$localhost"
echo $cmd
$cmd
exit
fi
#----------------------------------------------------------#
# Start builder with spot plugins #
#----------------------------------------------------------#
if [ $# -gt 0 -a "X$1" = "Xspotplugin" ]; then
echo "=== Building javatest-spot-builder..."
ant -f javatest-spot-builder/build.xml build-plugin
echo "=== Building javatest-mbed-device..."
cd javatest-mbed-device
ant clean compile
cd ..
# $builder -verbose -plugins:javatest-spot-builder/javatest-spot-builder.properties -verbose javatest-mbed-device
shift
echo "=== Running JamSpot javatest-mbed-device..."
exec $builder -plugins:javatest-spot-builder/javatest-spot-builder.properties $*
fi
if [ $# -gt 0 -a "X$1" = "Xspot" ]; then
shift
exec $builder -plugins:javatest-spot-builder/javatest-spot-builder.properties $*
fi
#----------------------------------------------------------#
# Fall through to build.jar #
#----------------------------------------------------------#
#echo $builder $*
exec $builder $*