jjg@416: #!/bin/sh jjg@416: # ohair@554: # Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. jjg@416: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@416: # jjg@416: # This code is free software; you can redistribute it and/or modify it jjg@416: # under the terms of the GNU General Public License version 2 only, as jjg@416: # published by the Free Software Foundation. jjg@416: # jjg@416: # This code is distributed in the hope that it will be useful, but WITHOUT jjg@416: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@416: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@416: # version 2 for more details (a copy is included in the LICENSE file that jjg@416: # accompanied this code). jjg@416: # jjg@416: # You should have received a copy of the GNU General Public License version jjg@416: # 2 along with this work; if not, write to the Free Software Foundation, jjg@416: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@416: # ohair@554: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ohair@554: # or visit www.oracle.com if you need additional information or have any ohair@554: # questions. jjg@416: # jjg@416: jjg@416: jdk=${1:-/opt/jdk/1.6.0} jjg@416: javah=${jdk}/bin/javah jjg@416: rtjar=${jdk}/jre/lib/rt.jar jjg@416: jjg@416: # compile test jjg@416: mkdir -p build/compareTest jjg@416: /opt/jdk/1.7.0/bin/javac -classpath build/classes -d build/compareTest test/tools/javah/compareTest/*.java jjg@416: jjg@416: # run test jjg@416: /opt/jdk/1.7.0/bin/java -classpath build/compareTest:build/classes CompareTest $javah $rtjar 2>&1 | tee CompareTest.out jjg@416: jjg@416: # show diffs for tests that failed jjg@416: grep 'error:' CompareTest.out | sed -e 's|.*new/||' -e 's/\.h$//' -e 's|_|.|g' > CompareTest.classes.fail jjg@416: jjg@416: for i in $(cat CompareTest.classes.fail) ; do jjg@416: /opt/jdk/1.7.0/bin/java -classpath compareTest:build/classes CompareTest $javah $rtjar $i jjg@416: diff -r old new jjg@416: done jjg@416: