summaryrefslogtreecommitdiffstats
path: root/contrib/jenkins_common.sh
blob: fa1d544b3a001bdbd480aa308440acd8f37140f5 (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
#!/bin/sh

set -ex

if [ -z "$MAKE" ]; then
    set +x
    echo "Error: you need to set \$MAKE before invoking, e.g. MAKE=make"
    exit 1
fi

osmo-clean-workspace.sh

verify_value_string_arrays_are_terminated.py $(find . -name "*.[hc]")

prep_build() {
    _src_dir="$1"
    _build_dir="$2"

    cd "$_src_dir"

    # clean again before each build variant
    osmo-clean-workspace.sh

    autoreconf --install --force

    mkdir -p "$_build_dir"
    cd "$_build_dir"
}

run_make() {
    $MAKE $PARALLEL_MAKE check || cat-testlogs.sh
}