summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author David Srbecky <dsrbecky@google.com> 2022-10-21 17:55:08 +0100
committer David Srbecky <dsrbecky@google.com> 2022-10-25 12:46:06 +0000
commitab007c544603ba2bfb180c8d6903e8710d06e2e0 (patch)
treec837a9c58a494b44c52c60a46253348997bbd95a
parent1944e26af29bf8b633d318acb86bbce477a7f2a7 (diff)
run-test build: Explicitly call generate-sources
Let the scripts explicitly call it rather than making it part of the build system magic. It is much easier now with the context object. Do not spam build log output with non-error messages. Test: Generated artifacts are the same Change-Id: I03b1e317b4f542c27b635ddd9defdd5c0e2bcb3e
-rw-r--r--default_build19
-rw-r--r--test/004-ReferenceMap/build.py19
-rw-r--r--test/004-StackWalk/build.py19
-rw-r--r--test/023-many-interfaces/build.py19
-rw-r--r--test/056-const-string-jumbo/build.py19
-rw-r--r--test/071-dexfile-get-static-size/build.py19
-rwxr-xr-xtest/071-dexfile-get-static-size/generate-sources2
-rw-r--r--test/089-many-methods/build.py1
-rw-r--r--test/1001-app-image-regions/build.py19
-rw-r--r--test/1003-metadata-section-strings/build.py19
-rw-r--r--test/126-miranda-multidex/build.py19
-rw-r--r--test/161-final-abstract-class/build.py19
-rw-r--r--test/1948-obsolete-const-method-handle/build.py1
-rw-r--r--test/1965-get-set-local-primitive-no-tables/build.py21
-rw-r--r--test/1966-get-set-local-objects-no-table/build.py21
-rw-r--r--test/2000-virtual-list-structural/build.py1
-rwxr-xr-xtest/2000-virtual-list-structural/generate-sources2
-rw-r--r--test/2034-spaces-in-SimpleName/build.py1
-rwxr-xr-xtest/2034-spaces-in-SimpleName/generate-sources4
-rw-r--r--test/2239-varhandle-perf/build.py1
-rw-r--r--test/303-verification-stress/build.py19
-rw-r--r--test/648-many-direct-methods/build.py19
-rw-r--r--test/670-bitstring-type-check/build.py19
-rw-r--r--test/701-easy-div-rem/build.py19
-rw-r--r--test/702-LargeBranchOffset/build.py19
-rw-r--r--test/712-varhandle-invocations/build.py1
-rw-r--r--test/804-class-extends-itself/build.py19
-rw-r--r--test/952-invoke-custom/build.py1
-rw-r--r--test/960-default-smali/build.py1
-rw-r--r--test/961-default-iface-resolution-gen/build.py1
-rw-r--r--test/964-default-iface-init-gen/build.py1
-rw-r--r--test/968-default-partial-compile-gen/build.py1
-rwxr-xr-xtest/968-default-partial-compile-gen/util-src/generate_java.py3
-rw-r--r--test/969-iface-super/build.py1
-rw-r--r--test/970-iface-super-resolution-gen/build.py3
-rw-r--r--test/971-iface-super/build.py1
-rwxr-xr-xtest/971-iface-super/util-src/generate_java.py3
-rw-r--r--test/979-const-method-handle/build.py1
-rwxr-xr-xtest/run-test-build.py11
39 files changed, 366 insertions, 22 deletions
diff --git a/default_build b/default_build
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/default_build
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/004-ReferenceMap/build.py b/test/004-ReferenceMap/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/004-ReferenceMap/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/004-StackWalk/build.py b/test/004-StackWalk/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/004-StackWalk/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/023-many-interfaces/build.py b/test/023-many-interfaces/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/023-many-interfaces/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/056-const-string-jumbo/build.py b/test/056-const-string-jumbo/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/056-const-string-jumbo/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/071-dexfile-get-static-size/build.py b/test/071-dexfile-get-static-size/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/071-dexfile-get-static-size/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/071-dexfile-get-static-size/generate-sources b/test/071-dexfile-get-static-size/generate-sources
index 4ce24cfc15..55afc03ccd 100755
--- a/test/071-dexfile-get-static-size/generate-sources
+++ b/test/071-dexfile-get-static-size/generate-sources
@@ -14,8 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-./default-build "$@"
-
# Bundle with the test the following resources:
# 1. test1.dex
# 2. test2.dex
diff --git a/test/089-many-methods/build.py b/test/089-many-methods/build.py
index c862ef8a87..9710f32fd3 100644
--- a/test/089-many-methods/build.py
+++ b/test/089-many-methods/build.py
@@ -15,6 +15,7 @@
def build(ctx):
+ ctx.bash("./generate-sources")
# Specify old API level as d8 automagically produces a multidex file
# when the API level is above 20. Failing the build here is deliberate.
# Force DEX generation so test also passes with --jvm.
diff --git a/test/1001-app-image-regions/build.py b/test/1001-app-image-regions/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/1001-app-image-regions/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/1003-metadata-section-strings/build.py b/test/1003-metadata-section-strings/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/1003-metadata-section-strings/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/126-miranda-multidex/build.py b/test/126-miranda-multidex/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/126-miranda-multidex/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/161-final-abstract-class/build.py b/test/161-final-abstract-class/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/161-final-abstract-class/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/1948-obsolete-const-method-handle/build.py b/test/1948-obsolete-const-method-handle/build.py
index 9fb88b0f00..4eb0ccb11b 100644
--- a/test/1948-obsolete-const-method-handle/build.py
+++ b/test/1948-obsolete-const-method-handle/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(api_level=28)
diff --git a/test/1965-get-set-local-primitive-no-tables/build.py b/test/1965-get-set-local-primitive-no-tables/build.py
new file mode 100644
index 0000000000..b7a608bedd
--- /dev/null
+++ b/test/1965-get-set-local-primitive-no-tables/build.py
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2022 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.
+
+import os
+
+
+def build(ctx):
+ ctx.bash("./generate-sources --" + os.environ["BUILD_MODE"])
+ ctx.default_build()
diff --git a/test/1966-get-set-local-objects-no-table/build.py b/test/1966-get-set-local-objects-no-table/build.py
new file mode 100644
index 0000000000..b7a608bedd
--- /dev/null
+++ b/test/1966-get-set-local-objects-no-table/build.py
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2022 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.
+
+import os
+
+
+def build(ctx):
+ ctx.bash("./generate-sources --" + os.environ["BUILD_MODE"])
+ ctx.default_build()
diff --git a/test/2000-virtual-list-structural/build.py b/test/2000-virtual-list-structural/build.py
index 9f5ad44779..af3ca62382 100644
--- a/test/2000-virtual-list-structural/build.py
+++ b/test/2000-virtual-list-structural/build.py
@@ -17,6 +17,7 @@ import os
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(use_desugar=False)
os.rename("src-ex/java/util/AbstractCollection.bak",
diff --git a/test/2000-virtual-list-structural/generate-sources b/test/2000-virtual-list-structural/generate-sources
index 5e21f12bac..5857b40dea 100755
--- a/test/2000-virtual-list-structural/generate-sources
+++ b/test/2000-virtual-list-structural/generate-sources
@@ -22,4 +22,4 @@ mv src-ex/java/util/AbstractCollection.java src-ex/java/util/AbstractCollection.
cp src-ex/java/util/AbstractCollection.bak src-ex/java/util/AbstractCollection.java
# Patch the copied version.
-patch src-ex/java/util/AbstractCollection.java AbstractCollection.patch
+patch -s src-ex/java/util/AbstractCollection.java AbstractCollection.patch
diff --git a/test/2034-spaces-in-SimpleName/build.py b/test/2034-spaces-in-SimpleName/build.py
index ff0aba2798..4ccb84897a 100644
--- a/test/2034-spaces-in-SimpleName/build.py
+++ b/test/2034-spaces-in-SimpleName/build.py
@@ -16,4 +16,5 @@
# Use API level 10000 for spaces in SimpleName
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(use_desugar=False, api_level="10000")
diff --git a/test/2034-spaces-in-SimpleName/generate-sources b/test/2034-spaces-in-SimpleName/generate-sources
index 99fc7e06c7..2e921a75eb 100755
--- a/test/2034-spaces-in-SimpleName/generate-sources
+++ b/test/2034-spaces-in-SimpleName/generate-sources
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Stop on failure and be verbose.
-set -e -x
+# Stop on failure
+set -e
export ASM_JAR="${ANDROID_BUILD_TOP}/prebuilts/misc/common/asm/asm-9.2.jar"
diff --git a/test/2239-varhandle-perf/build.py b/test/2239-varhandle-perf/build.py
index 1a5edaeada..1165a99c16 100644
--- a/test/2239-varhandle-perf/build.py
+++ b/test/2239-varhandle-perf/build.py
@@ -15,6 +15,7 @@
def build(ctx):
+ ctx.bash("./generate-sources")
if ctx.jvm:
return # The test does not build on JVM
diff --git a/test/303-verification-stress/build.py b/test/303-verification-stress/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/303-verification-stress/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/648-many-direct-methods/build.py b/test/648-many-direct-methods/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/648-many-direct-methods/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/670-bitstring-type-check/build.py b/test/670-bitstring-type-check/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/670-bitstring-type-check/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/701-easy-div-rem/build.py b/test/701-easy-div-rem/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/701-easy-div-rem/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/702-LargeBranchOffset/build.py b/test/702-LargeBranchOffset/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/702-LargeBranchOffset/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/712-varhandle-invocations/build.py b/test/712-varhandle-invocations/build.py
index 107499c22a..0695db38a6 100644
--- a/test/712-varhandle-invocations/build.py
+++ b/test/712-varhandle-invocations/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(experimental="var-handles")
diff --git a/test/804-class-extends-itself/build.py b/test/804-class-extends-itself/build.py
new file mode 100644
index 0000000000..2cd378a24e
--- /dev/null
+++ b/test/804-class-extends-itself/build.py
@@ -0,0 +1,19 @@
+#
+# Copyright (C) 2022 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.
+
+
+def build(ctx):
+ ctx.bash("./generate-sources")
+ ctx.default_build()
diff --git a/test/952-invoke-custom/build.py b/test/952-invoke-custom/build.py
index 4fc7423c45..c640b9e3da 100644
--- a/test/952-invoke-custom/build.py
+++ b/test/952-invoke-custom/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(use_desugar=False, api_level=28)
diff --git a/test/960-default-smali/build.py b/test/960-default-smali/build.py
index fe1c916d08..37b80cf719 100644
--- a/test/960-default-smali/build.py
+++ b/test/960-default-smali/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(experimental="default-methods")
diff --git a/test/961-default-iface-resolution-gen/build.py b/test/961-default-iface-resolution-gen/build.py
index fe1c916d08..37b80cf719 100644
--- a/test/961-default-iface-resolution-gen/build.py
+++ b/test/961-default-iface-resolution-gen/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(experimental="default-methods")
diff --git a/test/964-default-iface-init-gen/build.py b/test/964-default-iface-init-gen/build.py
index fe1c916d08..37b80cf719 100644
--- a/test/964-default-iface-init-gen/build.py
+++ b/test/964-default-iface-init-gen/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(experimental="default-methods")
diff --git a/test/968-default-partial-compile-gen/build.py b/test/968-default-partial-compile-gen/build.py
index 0200c9958c..8cbdf95376 100644
--- a/test/968-default-partial-compile-gen/build.py
+++ b/test/968-default-partial-compile-gen/build.py
@@ -17,5 +17,6 @@ import os
def build(ctx):
+ ctx.bash("./generate-sources --" + os.environ["BUILD_MODE"])
if os.environ["BUILD_MODE"] != "jvm":
ctx.default_build(experimental="default-methods")
diff --git a/test/968-default-partial-compile-gen/util-src/generate_java.py b/test/968-default-partial-compile-gen/util-src/generate_java.py
index a4a4a4dce0..6027df9ba9 100755
--- a/test/968-default-partial-compile-gen/util-src/generate_java.py
+++ b/test/968-default-partial-compile-gen/util-src/generate_java.py
@@ -69,7 +69,6 @@ class Compiler:
files = list(map(str, files))
cmd = ['sh', '-a', '-e', '--', str(self.javac)] + args + sorted(files)
subprocess.check_call(cmd)
- print("Compiled {} files".format(len(files)))
def execute(self):
"""
@@ -104,7 +103,6 @@ class Compiler:
self.compile_files("-d {outdir} -cp {outdir}".format(outdir = self.classes_dir), files)
# Remove these from the set of interfaces to be compiled.
ifaces -= tops
- print("Finished compiling all files.")
return
def main(argv):
@@ -125,7 +123,6 @@ def main(argv):
with expected_txt.open('w') as out:
print(mainclass.get_expected(), file=out)
- print("Wrote expected output")
Compiler(all_files, javac_exec, temp_dir, classes_dir).execute()
diff --git a/test/969-iface-super/build.py b/test/969-iface-super/build.py
index fe1c916d08..37b80cf719 100644
--- a/test/969-iface-super/build.py
+++ b/test/969-iface-super/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(experimental="default-methods")
diff --git a/test/970-iface-super-resolution-gen/build.py b/test/970-iface-super-resolution-gen/build.py
index fe1c916d08..57abccdc4a 100644
--- a/test/970-iface-super-resolution-gen/build.py
+++ b/test/970-iface-super-resolution-gen/build.py
@@ -13,6 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import os
+
def build(ctx):
+ ctx.bash("./generate-sources --" + os.environ["BUILD_MODE"])
ctx.default_build(experimental="default-methods")
diff --git a/test/971-iface-super/build.py b/test/971-iface-super/build.py
index 0200c9958c..8cbdf95376 100644
--- a/test/971-iface-super/build.py
+++ b/test/971-iface-super/build.py
@@ -17,5 +17,6 @@ import os
def build(ctx):
+ ctx.bash("./generate-sources --" + os.environ["BUILD_MODE"])
if os.environ["BUILD_MODE"] != "jvm":
ctx.default_build(experimental="default-methods")
diff --git a/test/971-iface-super/util-src/generate_java.py b/test/971-iface-super/util-src/generate_java.py
index dafe7f5664..c043a4afd7 100755
--- a/test/971-iface-super/util-src/generate_java.py
+++ b/test/971-iface-super/util-src/generate_java.py
@@ -69,7 +69,6 @@ class Compiler:
files = list(map(str, files))
cmd = ['sh', '-a', '-e', '--', str(self.javac)] + args + sorted(files)
subprocess.check_call(cmd)
- print("Compiled {} files".format(len(files)))
def execute(self):
"""
@@ -108,7 +107,6 @@ class Compiler:
self.compile_files("-d {outdir} -cp {outdir}".format(outdir = self.classes_dir), files)
# Remove these from the set of interfaces to be compiled.
ifaces -= tops
- print("Finished compiling all files.")
return
def main(argv):
@@ -129,7 +127,6 @@ def main(argv):
with expected_txt.open('w') as out:
print(mainclass.get_expected(), file=out)
- print("Wrote expected output")
Compiler(all_files, javac_exec, temp_dir, classes_dir).execute()
diff --git a/test/979-const-method-handle/build.py b/test/979-const-method-handle/build.py
index 9fb88b0f00..4eb0ccb11b 100644
--- a/test/979-const-method-handle/build.py
+++ b/test/979-const-method-handle/build.py
@@ -15,4 +15,5 @@
def build(ctx):
+ ctx.bash("./generate-sources")
ctx.default_build(api_level=28)
diff --git a/test/run-test-build.py b/test/run-test-build.py
index dd0a89c88b..4074015f4c 100755
--- a/test/run-test-build.py
+++ b/test/run-test-build.py
@@ -73,17 +73,6 @@ def build_test(args, mode, build_top, sbox, dstdir):
"NEED_DEX": {"host": "true", "target": "true", "jvm": "false"}[mode],
})
- generate_sources = join(dstdir, "generate-sources")
- if os.path.exists(generate_sources):
- proc = subprocess.run([generate_sources, "--" + mode],
- cwd=dstdir,
- env=env,
- encoding=os.sys.stdout.encoding,
- stderr=subprocess.STDOUT,
- stdout=subprocess.PIPE)
- if proc.returncode:
- raise Exception("Failed to generate sources for " + test_name + ":\n" + proc.stdout)
-
os.chdir(dstdir)
for name, value in env.items():
os.environ[name] = str(value)