summaryrefslogtreecommitdiff
path: root/scripts/build/test_suite.sh
blob: 8fabf42f9f0169aa036c183ff9b4995637ec13a3 (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
# Wrapper to build the test suite facilities
#
# Current assumption: test suites are independent of each other
#                     - no order handling required.

# List all test suite facilities, and parse their scripts
CT_TEST_SUITE_FACILITY_LIST=
for f in "${CT_LIB_DIR}/scripts/build/test_suite/"*.sh; do
    _f="$(basename "${f}" .sh)"
    __f="CT_TEST_SUITE_${_f}"
    __f=`echo ${__f} | tr "[:lower:]" "[:upper:]"`
    if [ "${!__f}" = "y" ]; then
        CT_DoLog DEBUG "Enabling test suite '${_f}'"
        . "${f}"
        CT_TEST_SUITE_FACILITY_LIST="${CT_TEST_SUITE_FACILITY_LIST} ${_f}"
    else
        CT_DoLog DEBUG "Disabling test suite '${_f}'"
    fi
done

# Download the test suite facilities
do_test_suite_get() {
    for f in ${CT_TEST_SUITE_FACILITY_LIST}; do
        do_test_suite_${f}_get
    done
}

# Extract and patch the test suite facilities
do_test_suite_extract() {
    for f in ${CT_TEST_SUITE_FACILITY_LIST}; do
        do_test_suite_${f}_extract
    done
}

# Build the test suite facilities
do_test_suite() {
    for f in ${CT_TEST_SUITE_FACILITY_LIST}; do
        do_test_suite_${f}_build
    done
}