2018-02-22 19:37:16 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
export PATH="/c/msys64/$MSYSTEM/bin:$PATH"
|
|
|
|
if [[ "$MSYSTEM" == "MINGW32" ]]; then
|
|
|
|
export MSYS2_ARCH="i686"
|
|
|
|
else
|
|
|
|
export MSYS2_ARCH="x86_64"
|
|
|
|
fi
|
|
|
|
|
|
|
|
pacman --noconfirm -Suy
|
|
|
|
|
|
|
|
pacman --noconfirm -S --needed \
|
|
|
|
base-devel \
|
2020-09-30 11:36:49 +02:00
|
|
|
lcov \
|
2018-02-22 19:37:16 +01:00
|
|
|
mingw-w64-$MSYS2_ARCH-ccache \
|
|
|
|
mingw-w64-$MSYS2_ARCH-gettext \
|
|
|
|
mingw-w64-$MSYS2_ARCH-libffi \
|
|
|
|
mingw-w64-$MSYS2_ARCH-meson \
|
2022-06-24 13:50:26 +02:00
|
|
|
mingw-w64-$MSYS2_ARCH-pcre2 \
|
2018-02-22 19:37:16 +01:00
|
|
|
mingw-w64-$MSYS2_ARCH-python3 \
|
2021-01-19 10:00:54 +01:00
|
|
|
mingw-w64-$MSYS2_ARCH-python-pip \
|
2018-02-22 19:37:16 +01:00
|
|
|
mingw-w64-$MSYS2_ARCH-toolchain \
|
2018-08-01 18:54:01 +02:00
|
|
|
mingw-w64-$MSYS2_ARCH-zlib \
|
|
|
|
mingw-w64-$MSYS2_ARCH-libelf
|
2018-02-22 19:37:16 +01:00
|
|
|
|
2018-07-06 09:33:22 +02:00
|
|
|
mkdir -p _coverage
|
2018-02-22 19:37:16 +01:00
|
|
|
mkdir -p _ccache
|
2020-02-25 12:46:11 +01:00
|
|
|
CCACHE_BASEDIR="$(pwd)"
|
|
|
|
CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
|
|
|
export CCACHE_BASEDIR CCACHE_DIR
|
|
|
|
|
2022-05-05 20:23:20 +02:00
|
|
|
pip3 install --upgrade --user meson==0.60.3
|
2020-02-25 12:46:11 +01:00
|
|
|
|
2020-05-06 21:54:35 +02:00
|
|
|
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
|
2020-02-25 12:46:11 +01:00
|
|
|
CFLAGS="-coverage -ftest-coverage -fprofile-arcs"
|
2018-07-06 09:33:22 +02:00
|
|
|
DIR="$(pwd)"
|
2020-02-25 12:46:11 +01:00
|
|
|
export PATH CFLAGS
|
2018-02-22 19:37:16 +01:00
|
|
|
|
2018-04-25 16:07:59 +02:00
|
|
|
meson --werror --buildtype debug _build
|
2018-02-22 19:37:16 +01:00
|
|
|
cd _build
|
|
|
|
ninja
|
|
|
|
|
2020-09-30 11:36:49 +02:00
|
|
|
lcov \
|
|
|
|
--quiet \
|
2022-04-28 12:57:45 +02:00
|
|
|
--config-file "${DIR}"/.lcovrc \
|
2020-09-30 11:36:49 +02:00
|
|
|
--directory "${DIR}/_build" \
|
|
|
|
--capture \
|
|
|
|
--initial \
|
|
|
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
|
2018-07-06 09:33:22 +02:00
|
|
|
|
2018-02-22 19:37:16 +01:00
|
|
|
# FIXME: fix the test suite
|
2020-02-25 12:46:11 +01:00
|
|
|
meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky || true
|
2018-04-27 17:04:52 +02:00
|
|
|
|
2020-09-30 11:36:49 +02:00
|
|
|
lcov \
|
|
|
|
--quiet \
|
2022-04-28 12:57:45 +02:00
|
|
|
--config-file "${DIR}"/.lcovrc \
|
2020-09-30 11:36:49 +02:00
|
|
|
--directory "${DIR}/_build" \
|
|
|
|
--capture \
|
|
|
|
--output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
|