diff options
author | 2024-06-10 21:43:34 +0100 | |
---|---|---|
committer | 2024-06-12 13:50:30 +0000 | |
commit | 45cb44a22e488c079c0818629f1234806061e113 (patch) | |
tree | 99c0f37c07ed0bd1230d3e459def1e665c25eef9 | |
parent | 7972f849b05927b3e48a6804846229f790056a1a (diff) |
Remove compact dex level plumbing from the test scripts and the tests
themselves.
dex2oat ignores --compact-dex-level since https://r.android.com/2736873.
Test: presubmits
Bug: 325430813
Change-Id: Ife6002aae2581613bd3f2a9a11a8f30bdf27fa4b
-rw-r--r-- | test/663-odd-dex-size/expected-stdout.txt | 1 | ||||
-rw-r--r-- | test/663-odd-dex-size/run.py | 23 | ||||
-rw-r--r-- | test/845-data-image/expected-stdout.txt | 2 | ||||
-rw-r--r-- | test/845-data-image/run.py | 8 | ||||
-rwxr-xr-x | test/default_run.py | 6 | ||||
-rwxr-xr-x | test/run-test | 6 | ||||
-rw-r--r-- | test/testrunner/target_config.py | 3 | ||||
-rwxr-xr-x | test/testrunner/testrunner.py | 25 |
8 files changed, 11 insertions, 63 deletions
diff --git a/test/663-odd-dex-size/expected-stdout.txt b/test/663-odd-dex-size/expected-stdout.txt index cd5a1ee8e4..3da1ec26e9 100644 --- a/test/663-odd-dex-size/expected-stdout.txt +++ b/test/663-odd-dex-size/expected-stdout.txt @@ -1,2 +1 @@ HelloWorld -HelloWorld diff --git a/test/663-odd-dex-size/run.py b/test/663-odd-dex-size/run.py deleted file mode 100644 index 635d23b4d6..0000000000 --- a/test/663-odd-dex-size/run.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# -# Copyright (C) 2021 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 run(ctx, args): - # Run normally. - ctx.default_run(args) - - # Run without cdex to trigger the unalignment in the vdex file. - ctx.default_run(args, Xcompiler_option=["--compact-dex-level=none"]) diff --git a/test/845-data-image/expected-stdout.txt b/test/845-data-image/expected-stdout.txt index bebd8c09fd..8db7853696 100644 --- a/test/845-data-image/expected-stdout.txt +++ b/test/845-data-image/expected-stdout.txt @@ -1,4 +1,2 @@ JNI_OnLoad called JNI_OnLoad called -JNI_OnLoad called -JNI_OnLoad called diff --git a/test/845-data-image/run.py b/test/845-data-image/run.py index 7e0dbf77c6..37c990fa47 100644 --- a/test/845-data-image/run.py +++ b/test/845-data-image/run.py @@ -19,10 +19,6 @@ import sys # Run the test twice: one run for generating the image, a second run for using # the image. def run(ctx, args): - ctx.default_run(args, Xcompiler_option=["--compact-dex-level=fast"], app_image=False, relocate=True) + ctx.default_run(args, app_image=False, relocate=True) # Pass another argument to let the test know it should now expect an image. - ctx.default_run(args, Xcompiler_option=["--compact-dex-level=fast"], app_image=False, relocate=True, test_args=["--second-run"]) - # Repeat the test with a different compact dex level, to make sure we don't - # pick up the existing image. - ctx.default_run(args, Xcompiler_option=["--compact-dex-level=none"], app_image=False, relocate=True) - ctx.default_run(args, Xcompiler_option=["--compact-dex-level=none"], app_image=False, relocate=True, test_args=["--second-run"]) + ctx.default_run(args, app_image=False, relocate=True, test_args=["--second-run"]) diff --git a/test/default_run.py b/test/default_run.py index 5ae04304ad..25b94b3f09 100755 --- a/test/default_run.py +++ b/test/default_run.py @@ -45,7 +45,6 @@ def parse_args(argv): argp.add_argument("--bionic", action="store_true") argp.add_argument("--boot", default="") argp.add_argument("--chroot", default="") - argp.add_argument("--compact-dex-level") argp.add_argument("--compiler-only-option", default=[], action="append") argp.add_argument("--create-runner", action="store_true") argp.add_argument("--diff-min-log-tag", default="E") @@ -372,9 +371,6 @@ def default_run(ctx, args, **kwargs): if arg == "-Xmethod-trace": # Method tracing can slow some tests down a lot. TIME_OUT_EXTRA += 1200 - if args.compact_dex_level: - arg = args.compact_dex_level - COMPILE_FLAGS += f" --compact-dex-level={arg}" if JVMTI_REDEFINE_STRESS: # APP_IMAGE doesn't really work with jvmti redefine stress SECONDARY_APP_IMAGE = False @@ -834,7 +830,7 @@ def default_run(ctx, args, **kwargs): # If no arguments need to be passed, just delete the odex file so that the runtime only picks up the vdex file. vdex_cmdline = f"rm {DEX_LOCATION}/oat/{ISA}/{name}.odex" else: - vdex_cmdline = f"{dex2oat_cmdline} {VDEX_ARGS} --compact-dex-level=none --input-vdex={DEX_LOCATION}/oat/{ISA}/{name}.vdex" + vdex_cmdline = f"{dex2oat_cmdline} {VDEX_ARGS} --input-vdex={DEX_LOCATION}/oat/{ISA}/{name}.vdex" elif TEST_DEX2OAT_DM: vdex_cmdline = f"{dex2oat_cmdline} {VDEX_ARGS} --dump-timings --dm-file={DEX_LOCATION}/oat/{ISA}/{name}.dm" dex2oat_cmdline = f"{dex2oat_cmdline} --copy-dex-files=false --output-vdex={DEX_LOCATION}/oat/{ISA}/primary.vdex" diff --git a/test/run-test b/test/run-test index 17d5227816..d0e7c8bdb1 100755 --- a/test/run-test +++ b/test/run-test @@ -286,11 +286,6 @@ if True: run_args += ["--prebuild"] prebuild_mode = "yes" shift() - elif arg == "--compact-dex-level": - option = arg - shift() - run_args += [f'"{option}" "{arg}"'] - shift() elif arg == "--strip-dex": run_args += ["--strip-dex"] shift() @@ -773,7 +768,6 @@ if True: " -O Run non-debug rather than debug build (off by default).\n" " -Xcompiler-option Pass an option to the compiler.\n" " --runtime-option Pass an option to the runtime.\n" - " --compact-dex-level Specify a compact dex level to the compiler.\n" " --debug Wait for the default debugger to attach.\n" " --debug-agent <agent-path>\n" " Wait for the given debugger agent to attach. Currently\n" diff --git a/test/testrunner/target_config.py b/test/testrunner/target_config.py index 7b2ac54262..c7583172ad 100644 --- a/test/testrunner/target_config.py +++ b/test/testrunner/target_config.py @@ -160,8 +160,7 @@ target_config = { }, 'art-heap-poisoning' : { 'run-test' : ['--interpreter', - '--optimizing', - '--cdex-none'], + '--optimizing'], 'env' : { 'ART_USE_READ_BARRIER' : 'false', 'ART_HEAP_POISONING' : 'true' diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py index ab1098e1b0..c6ebe36dab 100755 --- a/test/testrunner/testrunner.py +++ b/test/testrunner/testrunner.py @@ -203,7 +203,7 @@ def setup_csv_result(): csv_writer = csv.writer(csv_result) # Write the header. csv_writer.writerow(['target', 'run', 'prebuild', 'compiler', 'relocate', 'trace', 'gc', - 'jni', 'image', 'debuggable', 'jvmti', 'cdex_level', 'test', 'address_size', 'result']) + 'jni', 'image', 'debuggable', 'jvmti', 'test', 'address_size', 'result']) def send_csv_result(test, result): @@ -236,7 +236,6 @@ def gather_test_info(): VARIANT_TYPE_DICT['debuggable'] = {'ndebuggable', 'debuggable'} VARIANT_TYPE_DICT['gc'] = {'gcstress', 'gcverify', 'cms'} VARIANT_TYPE_DICT['prebuild'] = {'no-prebuild', 'prebuild'} - VARIANT_TYPE_DICT['cdex_level'] = {'cdex-none', 'cdex-fast'} VARIANT_TYPE_DICT['relocate'] = {'relocate', 'no-relocate'} VARIANT_TYPE_DICT['jni'] = {'jni', 'forcecopy', 'checkjni'} VARIANT_TYPE_DICT['address_sizes'] = {'64', '32'} @@ -270,7 +269,6 @@ def setup_test_env(): default_variants = { 'target': {'host', 'target'}, 'prebuild': {'prebuild'}, - 'cdex_level': {'cdex-fast'}, 'jvmti': { 'no-jvmti'}, 'compiler': {'optimizing', 'jit', @@ -447,8 +445,7 @@ def run_tests(tests): user_input_variants['relocate'], user_input_variants['trace'], user_input_variants['gc'], user_input_variants['jni'], user_input_variants['image'], - user_input_variants['debuggable'], user_input_variants['jvmti'], - user_input_variants['cdex_level']) + user_input_variants['debuggable'], user_input_variants['jvmti']) return config # [--host, --target] combines with all the other user input variants. @@ -460,12 +457,11 @@ def run_tests(tests): 'relocate': [''], 'trace': [''], 'gc': [''], 'jni': [''], 'image': [''], - 'debuggable': [''], 'jvmti': [''], - 'cdex_level': ['']}) + 'debuggable': [''], 'jvmti': ['']}) def start_combination(executor, config_tuple, global_options, address_size): test, target, run, prebuild, compiler, relocate, trace, gc, \ - jni, image, debuggable, jvmti, cdex_level = config_tuple + jni, image, debuggable, jvmti = config_tuple # NB The order of components here should match the order of # components in the regex parser in parse_test_name. @@ -481,12 +477,11 @@ def run_tests(tests): test_name += image + '-' test_name += debuggable + '-' test_name += jvmti + '-' - test_name += cdex_level + '-' test_name += test test_name += address_size variant_set = {target, run, prebuild, compiler, relocate, trace, gc, jni, - image, debuggable, jvmti, cdex_level, address_size} + image, debuggable, jvmti, address_size} args_test = global_options.copy() @@ -518,10 +513,6 @@ def run_tests(tests): elif prebuild == 'no-prebuild': args_test += ['--no-prebuild'] - if cdex_level: - # Add option and remove the cdex- prefix. - args_test += ['--compact-dex-level', cdex_level.replace('cdex-','')] - if compiler == 'optimizing': args_test += ['--optimizing'] elif compiler == 'interpreter': @@ -1000,7 +991,6 @@ def extract_test_name(test_name): regex += '(' + '|'.join(VARIANT_TYPE_DICT['image']) + ')-' regex += '(' + '|'.join(VARIANT_TYPE_DICT['debuggable']) + ')-' regex += '(' + '|'.join(VARIANT_TYPE_DICT['jvmti']) + ')-' - regex += '(' + '|'.join(VARIANT_TYPE_DICT['cdex_level']) + ')-' regex += '(' + '|'.join(RUN_TEST_SET) + ')' regex += '(' + '|'.join(VARIANT_TYPE_DICT['address_sizes']) + ')$' test_name_matcher = re.compile(regex) @@ -1039,9 +1029,8 @@ def parse_test_name(test_name): _user_input_variants['image'].add(parsed[8]) _user_input_variants['debuggable'].add(parsed[9]) _user_input_variants['jvmti'].add(parsed[10]) - _user_input_variants['cdex_level'].add(parsed[11]) - _user_input_variants['address_sizes'].add(parsed[13]) - return {parsed[12]} + _user_input_variants['address_sizes'].add(parsed[12]) + return {parsed[11]} def get_target_cpu_count(): |