summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2017-12-08 23:14:45 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2017-12-08 23:14:45 +0000
commitf279b82ef8b8bd766ddcd23e68130e11c04be67d (patch)
tree7d7a25a9b2a196064e39d33ce53a7ef1e6000705
parent8f1a586fd4ac9796e75b2b18638e39b33ad6e9a2 (diff)
parentdcd56c9116c2dc45b40b38fbb2a55c7e33a85a45 (diff)
Merge "Add --cdex-fast and --cdex-none variant to testrunner"
-rwxr-xr-xtest/etc/run-test-jar4
-rw-r--r--test/knownfailures.json8
-rwxr-xr-xtest/run-test6
-rwxr-xr-xtest/testrunner/testrunner.py21
4 files changed, 33 insertions, 6 deletions
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 31f43fc536..4844d1e758 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -184,6 +184,10 @@ while true; do
elif [ "x$1" = "x--prebuild" ]; then
PREBUILD="y"
shift
+ elif [ "x$1" = "x--compact-dex-level" ]; then
+ shift
+ COMPILE_FLAGS="${COMPILE_FLAGS} --compact-dex-level=$1"
+ shift
elif [ "x$1" = "x--jvmti-redefine-stress" ]; then
# APP_IMAGE doesn't really work with jvmti redefine stress
USE_JVMTI="y"
diff --git a/test/knownfailures.json b/test/knownfailures.json
index 5cd788816a..ae1830af5c 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -383,7 +383,7 @@
"tests": ["629-vdex-speed",
"634-vdex-duplicate"],
"description": ["Profile driven dexlayout does not work with vdex or dex verifier."],
- "variant": "speed-profile"
+ "variant": "speed-profile | cdex-fast"
},
{
"test_patterns": ["616-cha.*"],
@@ -649,5 +649,11 @@
"tests": "661-oat-writer-layout",
"variant": "interp-ac | interpreter | jit | no-dex2oat | no-prebuild | no-image | trace",
"description": ["Test is designed to only check --compiler-filter=speed"]
+ },
+ {
+ "tests": ["628-vdex", "975-iface-private"],
+ "variant": "cdex-fast",
+ "description": ["CompactDex doesn't yet work with input-vdex or 975-iface private"]
}
+
]
diff --git a/test/run-test b/test/run-test
index fdb2ee47a7..75fe15c919 100755
--- a/test/run-test
+++ b/test/run-test
@@ -225,6 +225,11 @@ while true; do
run_args="${run_args} --prebuild"
prebuild_mode="yes"
shift;
+ elif [ "x$1" = "x--compact-dex-level" ]; then
+ option="$1"
+ shift
+ run_args="${run_args} $option $1"
+ shift;
elif [ "x$1" = "x--strip-dex" ]; then
run_args="${run_args} --strip-dex"
shift;
@@ -660,6 +665,7 @@ if [ "$usage" = "yes" ]; then
echo " -Xcompiler-option Pass an option to the compiler."
echo " --build-option Pass an option to the build script."
echo " --runtime-option Pass an option to the runtime."
+ echo " --compact-dex-level Specify a compact dex level to the compiler."
echo " --debug Wait for the default debugger to attach."
echo " --debug-agent <agent-path>"
echo " Wait for the given debugger agent to attach. Currently"
diff --git a/test/testrunner/testrunner.py b/test/testrunner/testrunner.py
index 554b8a5429..93998579f3 100755
--- a/test/testrunner/testrunner.py
+++ b/test/testrunner/testrunner.py
@@ -141,6 +141,7 @@ def gather_test_info():
VARIANT_TYPE_DICT['debuggable'] = {'ndebuggable', 'debuggable'}
VARIANT_TYPE_DICT['gc'] = {'gcstress', 'gcverify', 'cms'}
VARIANT_TYPE_DICT['prebuild'] = {'no-prebuild', 'no-dex2oat', 'prebuild'}
+ VARIANT_TYPE_DICT['cdex_level'] = {'cdex-none', 'cdex-fast'}
VARIANT_TYPE_DICT['relocate'] = {'relocate-npatchoat', 'relocate', 'no-relocate'}
VARIANT_TYPE_DICT['jni'] = {'jni', 'forcecopy', 'checkjni'}
VARIANT_TYPE_DICT['address_sizes'] = {'64', '32'}
@@ -183,6 +184,9 @@ def setup_test_env():
if not _user_input_variants['prebuild']: # Default
_user_input_variants['prebuild'].add('prebuild')
+ if not _user_input_variants['cdex_level']: # Default
+ _user_input_variants['cdex_level'].add('cdex-none')
+
# By default only run without jvmti
if not _user_input_variants['jvmti']:
_user_input_variants['jvmti'].add('no-jvmti')
@@ -339,10 +343,11 @@ 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['pictest'],
- _user_input_variants['debuggable'], _user_input_variants['jvmti'])
+ _user_input_variants['debuggable'], _user_input_variants['jvmti'],
+ _user_input_variants['cdex_level'])
for test, target, run, prebuild, compiler, relocate, trace, gc, \
- jni, image, pictest, debuggable, jvmti in config:
+ jni, image, pictest, debuggable, jvmti, cdex_level in config:
for address_size in _user_input_variants['address_sizes_target'][target]:
if stop_testrunner:
# When ART_TEST_KEEP_GOING is set to false, then as soon as a test
@@ -356,6 +361,7 @@ def run_tests(tests):
test_name += target + '-run-test-'
test_name += run + '-'
test_name += prebuild + '-'
+ test_name += cdex_level + '-'
test_name += compiler + '-'
test_name += relocate + '-'
test_name += trace + '-'
@@ -369,7 +375,7 @@ def run_tests(tests):
test_name += address_size
variant_set = {target, run, prebuild, compiler, relocate, trace, gc, jni,
- image, pictest, debuggable, jvmti, address_size}
+ image, pictest, debuggable, jvmti, cdex_level, address_size}
options_test = options_all
@@ -386,6 +392,9 @@ def run_tests(tests):
elif prebuild == 'no-dex2oat':
options_test += ' --no-prebuild --no-dex2oat'
+ # Add option and remove the cdex- prefix.
+ options_test += ' --compact-dex-level ' + cdex_level.replace('cdex-','')
+
if compiler == 'optimizing':
options_test += ' --optimizing'
elif compiler == 'regalloc_gc':
@@ -806,6 +815,7 @@ def parse_test_name(test_name):
regex += '(' + '|'.join(VARIANT_TYPE_DICT['pictest']) + ')-'
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']) + ')$'
match = re.match(regex, test_name)
@@ -822,8 +832,9 @@ def parse_test_name(test_name):
_user_input_variants['pictest'].add(match.group(10))
_user_input_variants['debuggable'].add(match.group(11))
_user_input_variants['jvmti'].add(match.group(12))
- _user_input_variants['address_sizes'].add(match.group(14))
- return {match.group(13)}
+ _user_input_variants['cdex_level'].add(match.group(13))
+ _user_input_variants['address_sizes'].add(match.group(15))
+ return {match.group(14)}
raise ValueError(test_name + " is not a valid test")