summaryrefslogtreecommitdiff
path: root/test/default_run.py
diff options
context:
space:
mode:
author Ulya Trafimovich <skvadrik@google.com> 2023-06-30 15:46:34 +0100
committer Ulya Trofimovich <skvadrik@google.com> 2023-07-03 14:30:53 +0000
commitae80b58c00b8351584bf0ac589358e7d00d7a818 (patch)
treecffc95a8f221a34889926aa0b1a8ae19e85cfe47 /test/default_run.py
parent03b3e9dbad7ff6a27f279d153de2b8e2f465b020 (diff)
Change the meaning of --interpreter option in testing scripts.
Previously --interpreter used to run the tests on the slow C++ switch-interpreter (the analogue of -Xint option to dalvikvm). Now it runs the tests on the fast assembly interpreter, Nterp (the analogue of -Xusefit:false option to dalvikvm). --interp-ac can stil be used to run tests on the switch interpreter. Bug: 271573990 Test: `art/test.py --host -r 001-HelloWorld` with the following modifications that ensure ART runs in the intended mode: - no modifications: 10/10 tests pass - deliberaly break Nterp: 2/10 tests pass (only --interp-ac ones) - deliberately break JIT: 8/10 tests pass (only --jit tests fail) Change-Id: If2ec1df96b65c7e2dd7e81dff3ee0378bde62751
Diffstat (limited to 'test/default_run.py')
-rwxr-xr-xtest/default_run.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/default_run.py b/test/default_run.py
index 7e28dfc082..6fcaa1687b 100755
--- a/test/default_run.py
+++ b/test/default_run.py
@@ -73,6 +73,7 @@ def parse_args(argv):
argp.add_argument("--image", default=True, action=opt_bool)
argp.add_argument("--instruction-set-features", default="")
argp.add_argument("--interpreter", action="store_true")
+ argp.add_argument("--switch-interpreter", action="store_true")
argp.add_argument("--invoke-with", default=[], action="append")
argp.add_argument("--jit", action="store_true")
argp.add_argument("--jvm", action="store_true")
@@ -277,6 +278,7 @@ def default_run(ctx, args, **kwargs):
USE_EXTRACTED_ZIPAPEX = (args.runtime_extracted_zipapex != "")
EXTRACTED_ZIPAPEX_LOC = args.runtime_extracted_zipapex
INTERPRETER = args.interpreter
+ SWITCH_INTERPRETER = args.switch_interpreter
JIT = args.jit
INVOKE_WITH = " ".join(args.invoke_with)
USE_JVMTI = args.jvmti
@@ -655,15 +657,20 @@ def default_run(ctx, args, **kwargs):
GDB = "gdb"
GDB_ARGS += f" -d '{ANDROID_BUILD_TOP}' --args {DALVIKVM}"
- if INTERPRETER:
+ if SWITCH_INTERPRETER:
+ # run on the slow switch-interpreter enabled with -Xint
INT_OPTS += " -Xint"
+ if INTERPRETER:
+ # run on Nterp the fast interpreter, not the slow switch-interpreter enabled with -Xint
+ INT_OPTS += " -Xusejit:false"
+
if JIT:
INT_OPTS += " -Xusejit:true"
else:
INT_OPTS += " -Xusejit:false"
- if INTERPRETER or JIT:
+ if INTERPRETER or SWITCH_INTERPRETER or JIT:
if VERIFY == "y":
INT_OPTS += " -Xcompiler-option --compiler-filter=verify"
COMPILE_FLAGS += " --compiler-filter=verify"