diff options
author | Aditya Deshpande <aditya.deshpande@linaro.org> | 2021-07-30 19:36:01 +0100 |
---|---|---|
committer | Aditya Deshpande <aditya.deshpande@linaro.org> | 2021-07-30 19:36:01 +0100 |
commit | 6c1bf8f0b85efdab13a523086141bd2030de8a9f (patch) | |
tree | 4a3f24284fd1e32bb2aaaf7518c2d31380b16b18 | |
parent | d00da4f4b235c07f9cf384cb5d9a013d801e4aae (diff) | |
download | art-build-scripts-6c1bf8f0b85efdab13a523086141bd2030de8a9f.tar.gz |
Adds ability to run single gtest on host
Test: test_art_host.sh --single-test art_cmdline_tests --64bit
Change-Id: I8028664376969ddd7057b3a64c2312297da87bc2
-rw-r--r-- | utils/utils_run.sh | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/utils/utils_run.sh b/utils/utils_run.sh index 581ec0f8..a03dd2d9 100644 --- a/utils/utils_run.sh +++ b/utils/utils_run.sh @@ -106,19 +106,21 @@ test_single() { local return_code=0 local section_name="TEST_SINGLE_" if is_single_test_gtest "${test_name}"; then - if [ "$2" != "target" ]; then - log E "Running single gtests currently only supported on target" - exit 1 - fi section_name+="gtest_$1" section_starter "${section_name}" "${2}" - local path_to_test=$(find_gtests "${test_name}" "${2}") - if [[ -z "${path_to_test}" ]]; then - log E "Failed to find the test: ${test_name}" - return_code=1 - else - "${art_tools}"/run-gtests.sh "${path_to_test}" + if [ "$2" == "host" ]; then + local test_cmd="test-art-host-gtest-${test_name}${1}" + build/soong/soong_ui.bash --make-mode -j"${JCPU_COUNT}" "${test_cmd}" return_code=$? + elif [ "$2" == "target" ]; then + local path_to_test=$(find_gtests "${test_name}" "${2}") + if [[ -z "${path_to_test}" ]]; then + log E "Failed to find the test: ${test_name}" + return_code=1 + else + "${art_tools}"/run-gtests.sh "${path_to_test}" + return_code=$? + fi fi else section_name+="ART_$1" |