[wing] Add missing test files for the pipeline
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [wing] Add missing test files for the pipeline
- Date: Wed, 22 Aug 2018 10:48:37 +0000 (UTC)
commit d1dfd4f5ff4eaf7bb09335e089c21a3ee631bad3
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Wed Aug 22 12:48:09 2018 +0200
Add missing test files for the pipeline
.gitlab-ci.yml | 1 -
.gitlab-ci/test-msvc.bat | 19 +++++++++++++++
.gitlab-ci/test-msys2.sh | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 80 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5a72161..1af598c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,7 +24,6 @@ msys2-mingw32:
when: always
paths:
- _build/meson-logs
- - _coverage/
vs2017-x64:
stage: build
diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat
new file mode 100644
index 0000000..9b674f7
--- /dev/null
+++ b/.gitlab-ci/test-msvc.bat
@@ -0,0 +1,19 @@
+@echo on
+:: vcvarsall.bat sets various env vars like PATH, INCLUDE, LIB, LIBPATH for the
+:: specified build architecture
+call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
+@echo on
+
+:: FIXME: make warnings fatal
+pip3 install --upgrade --user meson==0.47.0 || goto :error
+meson _build || goto :error
+ninja -C _build || goto :error
+
+:: FIXME: dont ignore test errors
+meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER%
+
+:: FIXME: can we get code coverage support?
+
+goto :EOF
+:error
+exit /b 1
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh
new file mode 100755
index 0000000..48e18e9
--- /dev/null
+++ b/.gitlab-ci/test-msys2.sh
@@ -0,0 +1,61 @@
+#!/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 \
+ mingw-w64-$MSYS2_ARCH-ccache \
+ mingw-w64-$MSYS2_ARCH-gettext \
+ mingw-w64-$MSYS2_ARCH-libffi \
+ mingw-w64-$MSYS2_ARCH-meson \
+ mingw-w64-$MSYS2_ARCH-pcre \
+ mingw-w64-$MSYS2_ARCH-python3 \
+ mingw-w64-$MSYS2_ARCH-python3-pip \
+ mingw-w64-$MSYS2_ARCH-toolchain \
+ mingw-w64-$MSYS2_ARCH-zlib \
+ mingw-w64-$MSYS2_ARCH-libelf
+
+curl -O -J -L "https://github.com/linux-test-project/lcov/releases/download/v1.13/lcov-1.13.tar.gz"
+echo "44972c878482cc06a05fe78eaa3645cbfcbad6634615c3309858b207965d8a23 lcov-1.13.tar.gz" | sha256sum -c
+tar -xzf lcov-1.13.tar.gz
+LCOV="$(pwd)/lcov-1.13/bin/lcov"
+
+mkdir -p _coverage
+mkdir -p _ccache
+export CCACHE_BASEDIR="$(pwd)"
+export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
+pip3 install --upgrade --user meson==0.47.0
+export PATH="$HOME/.local/bin:$PATH"
+export CFLAGS="-coverage -ftest-coverage -fprofile-arcs"
+DIR="$(pwd)"
+
+meson --werror --buildtype debug _build
+cd _build
+ninja
+
+"${LCOV}" \
+ --quiet \
+ --rc lcov_branch_coverage=1 \
+ --directory "${DIR}/_build" \
+ --capture \
+ --initial \
+ --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
+
+# FIXME: fix the test suite
+meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} || true
+
+"${LCOV}" \
+ --quiet \
+ --rc lcov_branch_coverage=1 \
+ --directory "${DIR}/_build" \
+ --capture \
+ --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]