File: run_all_host_tests.sh

package info (click to toggle)
android-platform-system-tools-hidl 10.0.0%2Br36-3.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,936 kB
  • sloc: cpp: 21,933; yacc: 1,416; java: 1,239; lex: 496; sh: 360; python: 44; xml: 20; makefile: 12
file content (46 lines) | stat: -rwxr-xr-x 1,141 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash

function run() {
    local FAILED_TESTS=()

    local COMPILE_TIME_TESTS=(\
        hidl_error_test \
        hidl_export_test \
        hidl_hash_test \
        hidl_impl_test \
        hidl_system_api_test \
        android.hardware.tests.foo@1.0-vts.driver \
        android.hardware.tests.foo@1.0-vts.profiler)

    local RUN_TIME_TESTS=(\
        libhidl-gen-utils_test \
        libhidl-gen-host-utils_test \
        hidl-gen-host_test \
    )

    $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode -j \
        ${COMPILE_TIME_TESTS[*]} ${RUN_TIME_TESTS[*]} || return

    local BITNESS=("nativetest" "nativetest64")

    for bits in ${BITNESS[@]}; do
        for test in ${RUN_TIME_TESTS[@]}; do
            echo $bits $test
            $ANDROID_BUILD_TOP/out/host/linux-x86/$bits/$test/$test ||
                FAILED_TESTS+=("$bits:$test")
        done
    done

    echo
    echo ===== ALL HOST TESTS SUMMARY =====
    echo
    if [ ${#FAILED_TESTS[@]} -gt 0 ]; then
        for failed in ${FAILED_TESTS[@]}; do
            echo "FAILED TEST: $failed"
        done
    else
        echo "SUCCESS"
    fi
}

run