8218460: Test generation scripts do not invoke stream preprocessor correctly
Reviewed-by: rriggs
This commit is contained in:
parent
1fcbd0cd0d
commit
f380787a41
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -34,7 +34,8 @@ import java.util.regex.*;
|
||||
* Spp: A simple regex-based stream preprocessor based on Mark Reinhold's
|
||||
* sed-based spp.sh
|
||||
*
|
||||
* Usage: java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... <in >out
|
||||
* Usage:
|
||||
* java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... -iin -oout
|
||||
*
|
||||
* If -nel is declared then empty lines will not be substituted for lines of
|
||||
* text in the template that do not appear in the output.
|
||||
|
@ -82,9 +82,15 @@ do
|
||||
args="$args -Dvalue1=$value1 -Dvalue2=$value2 -Dvalue3=$value3 -Dwrong_primitive_type=$wrong_primitive_type"
|
||||
|
||||
echo $args
|
||||
java $SPP -nel $args < X-VarHandleTestAccess.java.template > VarHandleTestAccess${Type}.java
|
||||
java $SPP -nel $args < X-VarHandleTestMethodHandleAccess.java.template > VarHandleTestMethodHandleAccess${Type}.java
|
||||
java $SPP -nel $args < X-VarHandleTestMethodType.java.template > VarHandleTestMethodType${Type}.java
|
||||
out=VarHandleTestAccess${Type}.java
|
||||
rm -f $out
|
||||
java $SPP -nel $args -iX-VarHandleTestAccess.java.template -o$out
|
||||
out=VarHandleTestMethodHandleAccess${Type}.java
|
||||
rm -f $out
|
||||
java $SPP -nel $args -iX-VarHandleTestMethodHandleAccess.java.template -o$out
|
||||
out=VarHandleTestMethodType${Type}.java
|
||||
rm -f $out
|
||||
java $SPP -nel $args -iX-VarHandleTestMethodType.java.template -o$out
|
||||
done
|
||||
|
||||
for type in short char int long float double
|
||||
@ -161,7 +167,9 @@ do
|
||||
args="$args -Dvalue1=$value1 -Dvalue2=$value2 -Dvalue3=$value3"
|
||||
|
||||
echo $args
|
||||
java $SPP -nel $args < X-VarHandleTestByteArrayView.java.template > VarHandleTestByteArrayAs${Type}.java
|
||||
out=VarHandleTestByteArrayAs${Type}.java
|
||||
rm -f $out
|
||||
java $SPP -nel $args -iX-VarHandleTestByteArrayView.java.template -o$out
|
||||
done
|
||||
|
||||
rm -fr build
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,9 @@
|
||||
javac -d . ../../../../../make/jdk/src/classes/build/tools/spp/Spp.java
|
||||
|
||||
gen() {
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -DFulltype=$3 <Basic-X.java.template >Basic$2.java
|
||||
out=Basic$2.java
|
||||
rm -f $out
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -DFulltype=$3 -iBasic-X.java.template -o$out
|
||||
}
|
||||
|
||||
gen byte Byte Byte
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,10 +23,12 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
javac -d . ../../../../../make/jdk/src/classes/build/tools/spp/Spp.java > Spp.java
|
||||
javac -d . ../../../../../make/jdk/src/classes/build/tools/spp/Spp.java
|
||||
|
||||
gen() {
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -DFulltype=$3<CopyDirect-X-Memory.java.template >CopyDirect$2Memory.java
|
||||
out=CopyDirect$2Memory.java
|
||||
rm -f $out
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -DFulltype=$3 -iCopyDirect-X-Memory.java.template -o$out
|
||||
}
|
||||
|
||||
gen byte Byte Byte
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -23,9 +23,11 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
javac -d . ../../../../../make/jdk/src/classes/build/tools/spp/Spp.java > Spp.java
|
||||
javac -d . ../../../../../make/jdk/src/classes/build/tools/spp/Spp.java
|
||||
gen() {
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -DFulltype=$3<Order-X.java.template >Order$2.java
|
||||
out=Order$2.java
|
||||
rm -f $out
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -DFulltype=$3 -iOrder-X.java.template -o$out
|
||||
}
|
||||
|
||||
gen char Char Character
|
||||
|
@ -1,7 +1,7 @@
|
||||
#! /bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@ -30,7 +30,9 @@ gen() {
|
||||
# then $SPP -K$1 -Dtype=$1 -DType=$2 -Kprim<Basic-X.java.template >Basic$2.java
|
||||
# else $SPP -K$1 -Dtype=$1 -DType=$2 -K$3 <Basic-X.java.template >Basic$2.java
|
||||
# fi
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -K$3 -K$4 -K$5 -K$6 <Basic-X.java.template >Basic$2.java
|
||||
out=Basic$2.java
|
||||
rm -f $out
|
||||
java build.tools.spp.Spp -K$1 -Dtype=$1 -DType=$2 -K$3 -K$4 -K$5 -K$6 -iBasic-X.java.template -o$out
|
||||
}
|
||||
|
||||
gen boolean Boolean prim "" "" ""
|
||||
|
Loading…
x
Reference in New Issue
Block a user