Run-tests: Remove buildfailures.json
Since the per-test script is a method now,
we can easily exclude tests by just returning.
This has the side effect that directory with sources
is still created rather then being completely omitted.
But since the test will not be run, that is harmless.
Test: The (used) build artifacts are identical.
Change-Id: Ice728d654950dc6b47972306ed6ef9de337af833
diff --git a/test/004-UnsafeTest/build.py b/test/004-UnsafeTest/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/004-UnsafeTest/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/030-bad-finalizer/build.py b/test/030-bad-finalizer/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/030-bad-finalizer/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/122-npe/build.py b/test/122-npe/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/122-npe/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/1336-short-finalizer-timeout/build.py b/test/1336-short-finalizer-timeout/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/1336-short-finalizer-timeout/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/1339-dead-reference-safe/build.py b/test/1339-dead-reference-safe/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/1339-dead-reference-safe/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/160-read-barrier-stress/build.py b/test/160-read-barrier-stress/build.py
index 107499c..04eed85 100644
--- a/test/160-read-barrier-stress/build.py
+++ b/test/160-read-barrier-stress/build.py
@@ -15,4 +15,6 @@
def build(ctx):
+ if ctx.jvm:
+ return # The test does not build on JVM
ctx.default_build(experimental="var-handles")
diff --git a/test/178-app-image-native-method/build.py b/test/178-app-image-native-method/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/178-app-image-native-method/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/2005-pause-all-redefine-multithreaded/build.py b/test/2005-pause-all-redefine-multithreaded/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/2005-pause-all-redefine-multithreaded/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/2040-huge-native-alloc/build.py b/test/2040-huge-native-alloc/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/2040-huge-native-alloc/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/2041-bad-cleaner/build.py b/test/2041-bad-cleaner/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/2041-bad-cleaner/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/2235-JdkUnsafeTest/build.py b/test/2235-JdkUnsafeTest/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/2235-JdkUnsafeTest/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/2239-varhandle-perf/build.py b/test/2239-varhandle-perf/build.py
index 107499c..1a5edae 100644
--- a/test/2239-varhandle-perf/build.py
+++ b/test/2239-varhandle-perf/build.py
@@ -15,4 +15,7 @@
def build(ctx):
+ if ctx.jvm:
+ return # The test does not build on JVM
+
ctx.default_build(experimental="var-handles")
diff --git a/test/612-jit-dex-cache/build.py b/test/612-jit-dex-cache/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/612-jit-dex-cache/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/613-inlining-dex-cache/build.py b/test/613-inlining-dex-cache/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/613-inlining-dex-cache/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/674-hiddenapi/build.py b/test/674-hiddenapi/build.py
index f8c7600..e44af2a 100644
--- a/test/674-hiddenapi/build.py
+++ b/test/674-hiddenapi/build.py
@@ -24,6 +24,8 @@
def build(ctx):
+ if ctx.jvm:
+ return # The test does not build on JVM
ctx.default_build(use_hiddenapi=True)
# Move the jar file into the resource folder to be bundled with the test.
diff --git a/test/676-resolve-field-type/build.py b/test/676-resolve-field-type/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/676-resolve-field-type/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/689-zygote-jit-deopt/build.py b/test/689-zygote-jit-deopt/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/689-zygote-jit-deopt/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/692-vdex-inmem-loader/build.py b/test/692-vdex-inmem-loader/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/692-vdex-inmem-loader/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/692-vdex-secondary-loader/build.py b/test/692-vdex-secondary-loader/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/692-vdex-secondary-loader/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/693-vdex-inmem-loader-evict/build.py b/test/693-vdex-inmem-loader-evict/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/693-vdex-inmem-loader-evict/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/811-checker-invoke-super-secondary/build.py b/test/811-checker-invoke-super-secondary/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/811-checker-invoke-super-secondary/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/817-hiddenapi/build.py b/test/817-hiddenapi/build.py
index df00bb8..d5751f7 100644
--- a/test/817-hiddenapi/build.py
+++ b/test/817-hiddenapi/build.py
@@ -17,6 +17,9 @@
def build(ctx):
+ if ctx.jvm:
+ return # The test does not build on JVM
+
# Build the jars twice. First with applying hiddenapi, creating a boot jar, then
# a second time without to create a normal jar. We need to do this because we
# want to load the jar once as an app module and once as a member of the boot
diff --git a/test/831-unverified-bcp/build.py b/test/831-unverified-bcp/build.py
new file mode 100644
index 0000000..7025b81
--- /dev/null
+++ b/test/831-unverified-bcp/build.py
@@ -0,0 +1,20 @@
+#
+# 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):
+ if ctx.jvm:
+ return # The test does not build on JVM
+ ctx.default_build()
diff --git a/test/Android.bp b/test/Android.bp
index c62c45b..4b466d4 100644
--- a/test/Android.bp
+++ b/test/Android.bp
@@ -1888,7 +1888,6 @@
tool_files: [
"art_build_rules.py",
"run-test-build.py",
- "buildfailures.json",
"etc/default-check",
"etc/default-run",
"etc/run-test-jar",
diff --git a/test/buildfailures.json b/test/buildfailures.json
deleted file mode 100644
index c926298..0000000
--- a/test/buildfailures.json
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "description": ["The following tests don't build on RI."],
- "tests": [
- "004-UnsafeTest",
- "030-bad-finalizer",
- "122-npe",
- "160-read-barrier-stress",
- "178-app-image-native-method",
- "612-jit-dex-cache",
- "613-inlining-dex-cache",
- "674-hiddenapi",
- "676-resolve-field-type",
- "689-zygote-jit-deopt",
- "692-vdex-inmem-loader",
- "692-vdex-secondary-loader",
- "693-vdex-inmem-loader-evict",
- "811-checker-invoke-super-secondary",
- "817-hiddenapi",
- "831-unverified-bcp",
- "1336-short-finalizer-timeout",
- "1339-dead-reference-safe",
- "2005-pause-all-redefine-multithreaded",
- "2040-huge-native-alloc",
- "2041-bad-cleaner",
- "2235-JdkUnsafeTest",
- "2239-varhandle-perf"
- ],
- "variant": "jvm"
- }
-]
diff --git a/test/run-test-build.py b/test/run-test-build.py
index e3d2d13..1436d3d 100755
--- a/test/run-test-build.py
+++ b/test/run-test-build.py
@@ -26,9 +26,13 @@
import art_build_rules
ZIP = "prebuilts/build-tools/linux-x86/bin/soong_zip"
-BUILDFAILURES = json.loads(open(os.path.join("art", "test", "buildfailures.json"), "rt").read())
class BuildTestContext:
+ def __init__(self, mode):
+ self.jvm = (mode == "jvm")
+ self.host = (mode == "host")
+ self.target = (mode == "target")
+
def bash(self, cmd):
return subprocess.run(cmd, shell=True, check=True)
@@ -42,12 +46,6 @@
test = os.path.basename(srcdir)
dstdir = join(tmp, mode, test)
- # Don't build tests that are disabled since they might not compile (e.g. on jvm).
- def is_buildfailure(kf):
- return test in kf.get("tests", []) and mode == kf.get("variant") and not kf.get("env_vars")
- if any(is_buildfailure(kf) for kf in BUILDFAILURES):
- return None
-
# Copy all source files to the temporary directory.
shutil.copytree(srcdir, dstdir)
@@ -102,7 +100,7 @@
os.chdir(dstdir)
for name, value in env.items():
os.environ[name] = str(value)
- ctx = BuildTestContext()
+ ctx = BuildTestContext(mode)
script = pathlib.Path(join(dstdir, "build.py"))
if script.exists():
module = SourceFileLoader("build_" + test_name, str(script)).load_module()