aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/testsuite.sh
blob: 9f22976aeb64552267f1a3816598f7a73bd71ffb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

cd "$(dirname $0)"
. ../utils.sh

for d in */*/; do
    cd $d
    printf "${ANSI_CYAN}test $d ${ANSI_NOCOLOR}\n"
    if [ -f ./testsuite.sh ]; then
        if ./testsuite.sh; then
            printf "${ANSI_GREEN}OK${ANSI_NOCOLOR}\n"
        else
            printf "${ANSI_RED}FAILED!${ANSI_NOCOLOR}\n"
            exit 1
        fi
    else
        printf "${ANSI_YELLOW}Skip $d (no testsuite.sh)${ANSI_NOCOLOR}\n"
    fi
    cd ../..
done

printf "${ANSI_GREEN}All tests are OK${ANSI_NOCOLOR}\n"
exit 0