diff options
26 files changed, 18 insertions, 366 deletions
diff --git a/test/004-JniTest/build b/test/004-JniTest/build deleted file mode 100755 index e8e9f31ef4..0000000000 --- a/test/004-JniTest/build +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Make us exit on a failure. -# -set -e - -# Hard-wired use of experimental jack. -# TODO: fix this temporary work-around for lambdas, see b/19467889 -export USE_JACK=true -# export JACK_SERVER=false -# export JACK_REPOSITORY="${ANDROID_BUILD_TOP}/prebuilts/sdk/tools/jacks" - -# e.g. /foo/bar/jack-3.10.ALPHA.jar -> 3.10.ALPHA -# export JACK_VERSION="$(find "$JACK_REPOSITORY" -name '*ALPHA*' | sed 's/.*jack-//g' | sed 's/[.]jar//g')" -./default-build "$@" --experimental lambdas diff --git a/test/044-proxy/check b/test/044-proxy/check deleted file mode 100755 index 0cb2c32964..0000000000 --- a/test/044-proxy/check +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2017 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -expected="$1" -output="$2" - -# Jack inserts a synthetic default method for interface methods with covariant return types. -# Javac does not do this, so we must fiddle with the expected.txt to get the different behavior. - -expected_jack_line='Invocation of public default java[.]lang[.]Object NarrowingTest\$I2[.]foo[(][)]' -replaced_javac_line='Invocation of public abstract java.lang.Object NarrowingTest\$I1.foo()' - -expected_replaced="$expected" - -if [[ $USE_JACK == false ]]; then - expected_replaced="$output.tmp" - sed "s:$expected_jack_line:$replaced_javac_line:g" "$expected" > "$expected_replaced" -fi - -diff --strip-trailing-cr -q "$expected_replaced" "$output" >/dev/null diff --git a/test/048-reflect-v8/build b/test/048-reflect-v8/build deleted file mode 100644 index 3552b5c46c..0000000000 --- a/test/048-reflect-v8/build +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Make us exit on a failure. -set -e - -# Hard-wired use of experimental jack. -# TODO: fix this temporary work-around for lambdas, see b/19467889 -export USE_JACK=true - -./default-build "$@" --experimental default-methods diff --git a/test/146-bad-interface/build b/test/146-bad-interface/build deleted file mode 100755 index 0dd8573f54..0000000000 --- a/test/146-bad-interface/build +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - -./default-build "$@" --experimental default-methods diff --git a/test/563-checker-invoke-super/build b/test/563-checker-invoke-super/build deleted file mode 100755 index 32f84ef5ab..0000000000 --- a/test/563-checker-invoke-super/build +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Make us exit on a failure. -# -set -e - -# Hard-wired use of experimental jack. -# TODO: fix this temporary work-around for lambdas, see b/19467889 -export USE_JACK=true - -./default-build "$@" --experimental default-methods diff --git a/test/604-hot-static-interface/build b/test/604-hot-static-interface/build deleted file mode 100755 index 1ca2daf8b9..0000000000 --- a/test/604-hot-static-interface/build +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2016 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - -./default-build "$@" --experimental default-methods diff --git a/test/952-invoke-custom/build b/test/952-invoke-custom/build index a423ca6b4e..2b0b2c1274 100644 --- a/test/952-invoke-custom/build +++ b/test/952-invoke-custom/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/953-invoke-polymorphic-compiler/build b/test/953-invoke-polymorphic-compiler/build index a423ca6b4e..2b0b2c1274 100755 --- a/test/953-invoke-polymorphic-compiler/build +++ b/test/953-invoke-polymorphic-compiler/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/954-invoke-polymorphic-verifier/build b/test/954-invoke-polymorphic-verifier/build index a423ca6b4e..2b0b2c1274 100755 --- a/test/954-invoke-polymorphic-verifier/build +++ b/test/954-invoke-polymorphic-verifier/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/955-methodhandles-smali/build b/test/955-methodhandles-smali/build index a423ca6b4e..2b0b2c1274 100755 --- a/test/955-methodhandles-smali/build +++ b/test/955-methodhandles-smali/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/956-methodhandles/build b/test/956-methodhandles/build index a423ca6b4e..2b0b2c1274 100755 --- a/test/956-methodhandles/build +++ b/test/956-methodhandles/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/957-methodhandle-transforms/build b/test/957-methodhandle-transforms/build index a423ca6b4e..2b0b2c1274 100755 --- a/test/957-methodhandle-transforms/build +++ b/test/957-methodhandle-transforms/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/958-methodhandle-stackframe/build b/test/958-methodhandle-stackframe/build index a423ca6b4e..2b0b2c1274 100755 --- a/test/958-methodhandle-stackframe/build +++ b/test/958-methodhandle-stackframe/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/959-invoke-polymorphic-accessors/build b/test/959-invoke-polymorphic-accessors/build index a423ca6b4e..2b0b2c1274 100644 --- a/test/959-invoke-polymorphic-accessors/build +++ b/test/959-invoke-polymorphic-accessors/build @@ -17,9 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm. - export USE_JACK=true -fi - ./default-build "$@" --experimental method-handles diff --git a/test/960-default-smali/build b/test/960-default-smali/build index e8f4ed084a..44d6bd2046 100755 --- a/test/960-default-smali/build +++ b/test/960-default-smali/build @@ -17,13 +17,6 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - # Generate the Main.java file or fail ${ANDROID_BUILD_TOP}/art/test/utils/python/generate_java_main.py ./src diff --git a/test/961-default-iface-resolution-gen/build b/test/961-default-iface-resolution-gen/build index 2f7e3ba553..f2c222524e 100755 --- a/test/961-default-iface-resolution-gen/build +++ b/test/961-default-iface-resolution-gen/build @@ -17,16 +17,10 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - mkdir -p ./src # Generate the smali files and expected.txt or fail ./util-src/generate_java.py ./src ./expected.txt -./default-build "$@" --experimental default-methods +# dx runs out of memory with default 256M, give it more memory. +./default-build "$@" --experimental default-methods --dx-vm-option -JXmx512M diff --git a/test/962-iface-static/build b/test/962-iface-static/build index 0dd8573f54..82f49312ef 100755..100644 --- a/test/962-iface-static/build +++ b/test/962-iface-static/build @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright 2015 The Android Open Source Project +# Copyright 2017 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,11 +17,4 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - ./default-build "$@" --experimental default-methods diff --git a/test/963-default-range-smali/build b/test/963-default-range-smali/build deleted file mode 100755 index 0dd8573f54..0000000000 --- a/test/963-default-range-smali/build +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - -./default-build "$@" --experimental default-methods diff --git a/test/964-default-iface-init-gen/build b/test/964-default-iface-init-gen/build index 2f7e3ba553..a800151670 100755 --- a/test/964-default-iface-init-gen/build +++ b/test/964-default-iface-init-gen/build @@ -17,16 +17,10 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - mkdir -p ./src # Generate the smali files and expected.txt or fail ./util-src/generate_java.py ./src ./expected.txt -./default-build "$@" --experimental default-methods +# dx runs out of memory with just 256m, so increase it. +./default-build "$@" --experimental default-methods --dx-vm-option -JXmx512M diff --git a/test/965-default-verify/build b/test/965-default-verify/build deleted file mode 100755 index 0dd8573f54..0000000000 --- a/test/965-default-verify/build +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - -./default-build "$@" --experimental default-methods diff --git a/test/966-default-conflict/build b/test/966-default-conflict/build deleted file mode 100755 index 0dd8573f54..0000000000 --- a/test/966-default-conflict/build +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - -./default-build "$@" --experimental default-methods diff --git a/test/967-default-ame/build b/test/967-default-ame/build deleted file mode 100755 index 0dd8573f54..0000000000 --- a/test/967-default-ame/build +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# -# Copyright 2015 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# make us exit on a failure -set -e - -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - -./default-build "$@" --experimental default-methods diff --git a/test/969-iface-super/build b/test/969-iface-super/build index e8f4ed084a..44d6bd2046 100755 --- a/test/969-iface-super/build +++ b/test/969-iface-super/build @@ -17,13 +17,6 @@ # make us exit on a failure set -e -if [[ $@ != *"--jvm"* ]]; then - # Don't do anything with jvm - # Hard-wired use of experimental jack. - # TODO: fix this temporary work-around for default-methods, see b/19467889 - export USE_JACK=true -fi - # Generate the Main.java file or fail ${ANDROID_BUILD_TOP}/art/test/utils/python/generate_java_main.py ./src diff --git a/test/etc/default-build b/test/etc/default-build index 082772f44e..a88ef924a6 100755 --- a/test/etc/default-build +++ b/test/etc/default-build @@ -71,7 +71,8 @@ ZIP_COMPRESSION_METHOD="deflate" WITH_ZIP_ALIGN=false ZIP_ALIGN_BYTES="-1" -DX_FLAGS="" +DX_FLAGS="--min-sdk-version=24" +DX_VM_FLAGS="" SKIP_DX_MERGER="false" EXPERIMENTAL="" @@ -102,12 +103,20 @@ JAVAC_EXPERIMENTAL_ARGS["method-handles"]="-source 1.8 -target 1.8" JAVAC_EXPERIMENTAL_ARGS[${DEFAULT_EXPERIMENT}]="-source 1.8 -target 1.8" JAVAC_EXPERIMENTAL_ARGS["agents"]="-source 1.8 -target 1.8" +declare -A DX_EXPERIMENTAL_ARGS +DX_EXPERIMENTAL_ARGS["method-handles"]="--min-sdk-version=26" + while true; do if [ "x$1" = "x--dx-option" ]; then shift option="$1" DX_FLAGS="${DX_FLAGS} $option" shift + elif [ "x$1" = "x--dx-vm-option" ]; then + shift + option="$1" + DX_VM_FLAGS="${DX_VM_FLAGS} $option" + shift elif [ "x$1" = "x--jvm" ]; then shift elif [ "x$1" = "x--no-src" ]; then @@ -180,6 +189,7 @@ for experiment in ${EXPERIMENTAL}; do JACK_ARGS="${JACK_ARGS} ${JACK_EXPERIMENTAL_ARGS[${experiment}]}" SMALI_ARGS="${SMALI_ARGS} ${SMALI_EXPERIMENTAL_ARGS[${experiment}]}" JAVAC_ARGS="${JAVAC_ARGS} ${JAVAC_EXPERIMENTAL_ARGS[${experiment}]}" + DX_FLAGS="${DX_FLAGS} ${DX_EXPERIMENTAL_ARGS[${experiment}]}" done ######################################### @@ -234,7 +244,7 @@ function make_dex() { fi # Make dex file from desugared JAR. - ${DX} -JXmx256m --debug --dex --dump-to=${name}.lst --output=${name}.dex --dump-width=1000 ${DX_FLAGS} "${dx_input}" + ${DX} -JXmx256m ${DX_VM_FLAGS} --debug --dex --dump-to=${name}.lst --output=${name}.dex --dump-width=1000 ${DX_FLAGS} "${dx_input}" } if [ -e classes.dex ]; then diff --git a/test/knownfailures.json b/test/knownfailures.json index f3e9ab02e1..4ebcaa8bb7 100644 --- a/test/knownfailures.json +++ b/test/knownfailures.json @@ -600,15 +600,12 @@ "004-NativeAllocations", "004-ReferenceMap", "004-StackWalk", - "048-reflect-v8", "089-many-methods", "138-duplicate-classes-check", "146-bad-interface", "157-void-class", - "563-checker-invoke-super", "580-checker-string-fact-intrinsics", "596-monitor-inflation", - "604-hot-static-interface", "612-jit-dex-cache", "613-inlining-dex-cache", "616-cha-interface-default", @@ -621,19 +618,8 @@ "948-change-annotations", "952-invoke-custom", "953-invoke-polymorphic-compiler", - "956-methodhandles", - "957-methodhandle-transforms", "958-methodhandle-stackframe", - "959-invoke-polymorphic-accessors", "960-default-smali", - "961-default-iface-resolution-gen", - "962-iface-static", - "963-default-range-smali", - "964-default-iface-init-gen", - "965-default-verify", - "966-default-conflict", - "967-default-ame", - "969-iface-super", "981-dedup-original-dex" ], "description": "The tests above fail with --build-with-javac-dx.", diff --git a/tools/desugar.sh b/tools/desugar.sh index 43541aa6da..ae7bf0a48b 100755 --- a/tools/desugar.sh +++ b/tools/desugar.sh @@ -72,7 +72,7 @@ while true; do shift done -desugar_args=() +desugar_args=(--min_sdk_version=10000) boot_class_path_list=$($TOP/art/tools/bootjars.sh $bootjars_args --path) for path in $boot_class_path_list; do |