summaryrefslogtreecommitdiff
path: root/stacks/crdop/scripts/test-all.sh
blob: f12181e571148892a147563f9b473b42789c5516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
# Smoke test + optional upstream cmocka unit tests (CTest).
set -euo pipefail

ROOT="$(cd "$(dirname "$0")/.." && pwd)"
BUILD="${CRDOP_BUILD_DIR:-${ROOT}/build}"

export CRDOP_BUILD_TESTS="${CRDOP_BUILD_TESTS:-ON}"
export CRDOP_RUN_TESTS="${CRDOP_RUN_TESTS:-ON}"

"${ROOT}/scripts/build-crdop.sh"

if [[ ! -f "${BUILD}/CTestTestfile.cmake" ]]; then
    echo "NOTE: unit tests not built (libcmocka missing or unsupported platform)" >&2
fi

echo "OK: CRDOP test-all finished"
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com