author | peterz |
Fri, 28 May 2010 13:32:40 +0400 | |
changeset 5594 | 3db39773da2e |
parent 3996 | dc676a9093b3 |
child 5520 | 86e4b9a9da40 |
permissions | -rw-r--r-- |
3996
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
1 |
#!/bin/sh |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
2 |
# |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
3 |
# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
5 |
# |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
6 |
# This code is free software; you can redistribute it and/or modify it |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
8 |
# published by the Free Software Foundation. |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
9 |
# |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
14 |
# accompanied this code). |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
15 |
# |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
16 |
# You should have received a copy of the GNU General Public License version |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
19 |
# |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
20 |
# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
21 |
# CA 95054 USA or visit www.sun.com if you need additional information or |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
22 |
# have any questions. |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
23 |
# |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
24 |
|
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
25 |
jdk=${1:-/opt/jdk/1.6.0} |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
26 |
javah=${jdk}/bin/javah |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
27 |
rtjar=${jdk}/jre/lib/rt.jar |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
28 |
|
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
29 |
# compile test |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
30 |
mkdir -p build/compareTest |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
31 |
/opt/jdk/1.7.0/bin/javac -classpath build/classes -d build/compareTest test/tools/javah/compareTest/*.java |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
32 |
|
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
33 |
# run test |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
34 |
/opt/jdk/1.7.0/bin/java -classpath build/compareTest:build/classes CompareTest $javah $rtjar 2>&1 | tee CompareTest.out |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
35 |
|
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
36 |
# show diffs for tests that failed |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
37 |
grep 'error:' CompareTest.out | sed -e 's|.*new/||' -e 's/\.h$//' -e 's|_|.|g' > CompareTest.classes.fail |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
38 |
|
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
39 |
for i in $(cat CompareTest.classes.fail) ; do |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
40 |
/opt/jdk/1.7.0/bin/java -classpath compareTest:build/classes CompareTest $javah $rtjar $i |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
41 |
diff -r old new |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
42 |
done |
dc676a9093b3
6572945: javah should be written as an annotation processor, not a doclet
jjg
parents:
diff
changeset
|
43 |