diff options
author | Artem Serov <artem.serov@linaro.org> | 2021-08-02 17:52:08 +0000 |
---|---|---|
committer | Linaro Android Code Review <android-review@review.linaro.org> | 2021-08-02 17:52:08 +0000 |
commit | 891fc5ba58dd16da898f4d7b304c4e1935356af9 (patch) | |
tree | c2228e6a16a9c846ab61f3d850036b10248d14b6 | |
parent | 74a7dec890bb72d393662c3977478ab281bfab0b (diff) | |
parent | 6c1bf8f0b85efdab13a523086141bd2030de8a9f (diff) | |
download | art-build-scripts-891fc5ba58dd16da898f4d7b304c4e1935356af9.tar.gz |
Merge "Adds ability to run single gtest on host"
-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" |