diff options
| -rw-r--r-- | test/2279-aconfig-flags/build.py | 20 | ||||
| -rw-r--r-- | test/2279-aconfig-flags/expected-stderr.txt | 0 | ||||
| -rw-r--r-- | test/2279-aconfig-flags/expected-stdout.txt | 0 | ||||
| -rw-r--r-- | test/2279-aconfig-flags/info.txt | 1 | ||||
| -rw-r--r-- | test/2279-aconfig-flags/src/Main.java | 32 | ||||
| -rw-r--r-- | test/2279-aconfig-flags/test-metadata.json | 5 | ||||
| -rw-r--r-- | test/knownfailures.json | 3 |
7 files changed, 60 insertions, 1 deletions
diff --git a/test/2279-aconfig-flags/build.py b/test/2279-aconfig-flags/build.py new file mode 100644 index 0000000000..abe80d8bbb --- /dev/null +++ b/test/2279-aconfig-flags/build.py @@ -0,0 +1,20 @@ +# +# Copyright (C) 2024 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/2279-aconfig-flags/expected-stderr.txt b/test/2279-aconfig-flags/expected-stderr.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/2279-aconfig-flags/expected-stderr.txt diff --git a/test/2279-aconfig-flags/expected-stdout.txt b/test/2279-aconfig-flags/expected-stdout.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/2279-aconfig-flags/expected-stdout.txt diff --git a/test/2279-aconfig-flags/info.txt b/test/2279-aconfig-flags/info.txt new file mode 100644 index 0000000000..7cae0c0d9d --- /dev/null +++ b/test/2279-aconfig-flags/info.txt @@ -0,0 +1 @@ +Tests for trunk stable flags diff --git a/test/2279-aconfig-flags/src/Main.java b/test/2279-aconfig-flags/src/Main.java new file mode 100644 index 0000000000..4a282db04d --- /dev/null +++ b/test/2279-aconfig-flags/src/Main.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2024 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 com.android.libcore.Flags; + +public class Main { + public static void main(String[] args) { + if (!isVTrunkStableFlagEnabled()) { + throw new AssertionError( + "The value of com.android.libcore.v_apis flag is expected to be true."); + } + } + + private static boolean isVTrunkStableFlagEnabled() { + // The Flags class definition is expected to be in core-libart.jar. + return Flags.vApis(); + } + +} diff --git a/test/2279-aconfig-flags/test-metadata.json b/test/2279-aconfig-flags/test-metadata.json new file mode 100644 index 0000000000..75f6c0270f --- /dev/null +++ b/test/2279-aconfig-flags/test-metadata.json @@ -0,0 +1,5 @@ +{ + "build-param": { + "jvm-supported": "false" + } +} diff --git a/test/knownfailures.json b/test/knownfailures.json index a10e0d6dc5..688a2d3aa3 100644 --- a/test/knownfailures.json +++ b/test/knownfailures.json @@ -1234,7 +1234,8 @@ "2261-badcleaner-in-systemcleaner", "2263-method-trace-jit", "2270-mh-internal-hiddenapi-use", - "2271-profile-inline-cache"], + "2271-profile-inline-cache", + "2279-aconfig-flags"], "variant": "jvm", "description": ["Doesn't run on RI."] }, |