aboutsummaryrefslogtreecommitdiff
path: root/detailed-analysis.sh
blob: c68ef95514b441d54f0655f7106005b47ebd69c4 (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash

if [[ "x$1" = "x-h" || "x$1" = "x--help" ]]; then
    echo -e "\tTARGET:\t which platform to test, default: generic"
    exit 0
fi

failed_builds=""
successful_builds=""
TARGET=${TARGET:-generic}

count_failed(){
    running_build="${*}"
    $*
    retcode=$?

    if [[ $retcode -ne 0 ]]
    then
        failed_builds="${failed_builds}\n${LOGFILE_BASENAME}"
    else
        successful_builds="${successful_builds}\n${LOGFILE_BASENAME}"
    fi
}

ROOT_DIR=$(readlink -f $(dirname $0))

LOGFILE_BASENAME=log-normal count_failed ${ROOT_DIR}/build-${TARGET}.sh -q
export LCOV=1
LOGFILE_BASENAME=log-lcov count_failed ${ROOT_DIR}/build-${TARGET}.sh -q
unset LCOV

export DOXYGEN_HTML=1
LOGFILE_BASENAME=log-doxygen-html count_failed ${ROOT_DIR}/build-${TARGET}.sh -q
unset DOXYGEN_HTML

export USER_HTML=1
LOGFILE_BASENAME=log-user-html count_failed ${ROOT_DIR}/build-${TARGET}.sh -q
unset USER_HTML

export SCAN_BUILD=1
LOGFILE_BASENAME=log-clang count_failed ${ROOT_DIR}/build-${TARGET}.sh -q
unset SCAN_BUILD

export SPARSE=1
LOGFILE_BASENAME=log-sparse count_failed ${ROOT_DIR}/build-${TARGET}.sh -q
unset SPARSE

echo
echo -e "successful builds: ${successful_builds}"
echo
echo -e "failed builds: ${failed_builds}"

if [[ -z ${failed_builds} ]]; then
    exit 0
else
    exit 1
fi

## vim: set sw=4 sts=4 et foldmethod=syntax : ##