test/tools/javah/compareTest/CompareTest.sh

Mon, 21 Jan 2013 20:13:56 +0000

author
mcimadamore
date
Mon, 21 Jan 2013 20:13:56 +0000
changeset 1510
7873d37f5b37
parent 554
9d9f26857129
child 2525
2eb010b6cb22
permissions
-rw-r--r--

8005244: Implement overload resolution as per latest spec EDR
Summary: Add support for stuck expressions and provisional applicability
Reviewed-by: jjg

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

mercurial