diff options
author | Aditya Deshpande <aditya.deshpande@linaro.org> | 2021-08-05 16:20:21 +0100 |
---|---|---|
committer | Aditya Deshpande <aditya.deshpande@linaro.org> | 2021-08-10 16:03:51 +0100 |
commit | cc26f815e082e6c7a61919553d8dfd2a6cdc7062 (patch) | |
tree | 212936722d15628dd27e1af4e0d3fa0a59dc7bbf | |
parent | 891fc5ba58dd16da898f4d7b304c4e1935356af9 (diff) | |
download | art-build-scripts-cc26f815e082e6c7a61919553d8dfd2a6cdc7062.tar.gz |
ART: Add --dump-cfg option to test scripts.
This patch:
1) Recreates the changes to run_test_with_python_runner() made in patch
https://android-review.linaro.org/c/linaro-art/art-build-scripts/+/22346
which were lost in the patch which moved the function
to utils_run.sh. Adds the --dump-cfg option to test_art_target.sh.
2) Adds the --dump-cfg option to test_art_host.sh.
Test: ./scripts/tests/test_art_target.sh --single-test test-art-target\
-run-test-debug\-prebuild-optimizing-no-relocate-ntrace-cms-checkjni\
-picimage-debuggable-no-jvmti-cdex-fast-404-optimizing-allocator64\
--dump-cfg <path>/graph.cfg
Test: ./scripts/tests/test_art_host.sh --single-test test-art-host\
-run-test-debug-prebuild-optimizing-no-relocate-ntrace-cms-checkjni\
-picimage-ndebuggable-no-jvmti-cdex-fast-404-optimizing-allocator64\
--dump-cfg <path>/graph.cfg
Change-Id: I309fa3827f61e5136bf8767858bb5b346463cbb8
-rwxr-xr-x | tests/test_art_host.sh | 8 | ||||
-rw-r--r-- | utils/utils_run.sh | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_art_host.sh b/tests/test_art_host.sh index f9226583..a5c76b4f 100755 --- a/tests/test_art_host.sh +++ b/tests/test_art_host.sh @@ -37,6 +37,7 @@ declare -A options_format=( ["32bit"]="false" ["64bit"]="false" ["default"]="p:set_defaults_wrapper()" + ["dump-cfg"]="" ["gcstress"]="false" ["gtest"]="false" ["help"]="p:usage()" @@ -85,6 +86,11 @@ validate_options() { log E "The --jobs option must be followed by an integer." exit 1 fi + + if [[ -n "${options["dump-cfg"]}" ]] && [[ -z "${options["single-test"]}" ]]; then + log E "Can only dump .cfg for a single test." + exit 1 + fi } set_job_count() { @@ -118,6 +124,8 @@ usage() { feature names. When the list is used, '-' before a feature name means the ART compiler must not use the feature for code generation." + log I " --dump-cfg <path> - dump .cfg to the specified host full path. Only runs for a" + log I " single test" log I "-------------------------------------------" log I "Tests:" log I " --gtest - run gtests." diff --git a/utils/utils_run.sh b/utils/utils_run.sh index a03dd2d9..85d9eef0 100644 --- a/utils/utils_run.sh +++ b/utils/utils_run.sh @@ -39,6 +39,9 @@ run_test_with_python_runner() { if ${local_options["gcstress"]}; then test_command+=" --gcstress" fi + if [[ -n "${local_options["dump-cfg"]}" ]]; then + test_command+=" --dump-cfg ${local_options["dump-cfg"]}" + fi if [[ $1 == "single-test" ]]; then test_command+=" -t $3 --run-test --${4}" else |