diff options
| author | Steven Moreland <smoreland@google.com> | 2020-09-09 23:48:58 +0000 |
|---|---|---|
| committer | Steven Moreland <smoreland@google.com> | 2020-09-10 00:56:21 +0000 |
| commit | 4d124be043b5741869192a515d584ea5ac3a4563 (patch) | |
| tree | 075d9a7039be5343b16032f80ca76ee3740f6049 | |
| parent | bc45e6d724b90ac5f9a6e9d260a794b5f61ffdbd (diff) | |
| download | platform_system_tools_hidl-4d124be043b5741869192a515d584ea5ac3a4563.tar.gz platform_system_tools_hidl-4d124be043b5741869192a515d584ea5ac3a4563.tar.bz2 platform_system_tools_hidl-4d124be043b5741869192a515d584ea5ac3a4563.zip | |
Cleanup run-all tests scripts.
All tests except for the hidl-lint test can now run on Android's CI. So,
splitting that test into a specific file for now.
Bug: 127714188
Test: run_tradefed_incompatible_tests.sh
Change-Id: Ia3a3c0a0d5971cb6bea5e3a2f06e02a735ce7684
| -rwxr-xr-x | test/run_all_device_tests.sh | 81 | ||||
| -rwxr-xr-x | test/run_tradefed_incompatible_tests.sh (renamed from test/run_all_host_tests.sh) | 19 |
2 files changed, 3 insertions, 97 deletions
diff --git a/test/run_all_device_tests.sh b/test/run_all_device_tests.sh deleted file mode 100755 index 673657bf8..000000000 --- a/test/run_all_device_tests.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -function run() { - local FAILED_TESTS=() - local SKIPPED_TESTS=() - - # Tests directly relevant to HIDL infrustructure but aren't - # located in system/tools/hidl - local RELATED_RUNTIME_TESTS=(\ - libhidl_test \ - ) - - local RUN_TIME_TESTS=(\ - libhidl-gen-utils_test \ - ) - RUN_TIME_TESTS+=(${RELATED_RUNTIME_TESTS[@]}) - - local SCRIPT_TESTS=(\ - hidl_test\ - hidl_test_java\ - fmq_test\ - ) - - $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode -j \ - ${RUN_TIME_TESTS[*]} ${SCRIPT_TESTS[*]} || exit 1 - - # TODO(b/129507417): build with supported configurations - mkdir -p $ANDROID_PRODUCT_OUT/data/framework/hidl_test_java.jar || exit 1 - cp $ANDROID_PRODUCT_OUT/testcases/hidl_test_java_java/*/hidl_test_java_java.jar \ - $ANDROID_PRODUCT_OUT/data/framework/hidl_test_java_java.jar || exit 1 - - adb sync data || exit 1 - - local BITNESS=("nativetest" "nativetest64") - - for test in ${RUN_TIME_TESTS[@]}; do - local ran_test=0 - for bits in ${BITNESS[@]}; do - local test_binary="/data/$bits/$test/$test" - - # only run test if binary is installed - if adb shell sh -c '"[ -f '$test_binary' ]"'; then - ran_test=1 - else - SKIPPED_TESTS+=("$bits:$test") - break - fi - - echo $test_binary - adb shell $test_binary || FAILED_TESTS+=("$bits:$test") - done - if [ $ran_test -ne 1 ]; then - FAILED_TESTS+=("$test (not installed)") - fi - done - - for test in ${SCRIPT_TESTS[@]}; do - echo $test - adb shell /data/nativetest64/$test || - FAILED_TESTS+=("$test") - done - - echo - echo ===== ALL DEVICE TESTS SUMMARY ===== - echo - if [ ${#SKIPPED_TESTS[@]} -gt 0 ]; then - for skipped in ${SKIPPED_TEST[@]}; do - echo "SKIPPED TEST: $skipped" - done - fi - if [ ${#FAILED_TESTS[@]} -gt 0 ]; then - for failed in ${FAILED_TESTS[@]}; do - echo "FAILED TEST: $failed" - done - exit 1 - else - echo "SUCCESS" - fi -} - -run diff --git a/test/run_all_host_tests.sh b/test/run_tradefed_incompatible_tests.sh index 6542d6f0b..e21985aff 100755 --- a/test/run_all_host_tests.sh +++ b/test/run_tradefed_incompatible_tests.sh @@ -3,27 +3,14 @@ function run() { local FAILED_TESTS=() - local COMPILE_TIME_TESTS=(\ - hidl_hash_test \ - hidl2aidl_test \ - hidl_error_test \ - hidl_export_test \ - hidl_format_test \ - hidl_cpp_impl_test \ - hidl_java_impl_test \ - hidl_system_api_test \ - android.hardware.tests.foo@1.0-vts.driver \ - android.hardware.tests.foo@1.0-vts.profiler) - + # the linter test requires having the source tree available in order + # to run, so it isn't using TEST_MAPPING/tradefed/etc local RUN_TIME_TESTS=(\ - libhidl-gen-utils_test \ - libhidl-gen-host-utils_test \ - hidl-gen-host_test \ hidl-lint_test \ ) $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode -j \ - ${COMPILE_TIME_TESTS[*]} ${RUN_TIME_TESTS[*]} || return + ${RUN_TIME_TESTS[*]} || return local BITNESS=("nativetest" "nativetest64") |
