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