mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 22:52:09 +01:00
ci: Add valgrind memcheck support on Fedora
Add a separate CI job which runs memcheck on the unit tests. This is done as a separate job from the main build, since we don’t want it to interact with code coverage at all. Currently, failure of this job is ignored. Issue #333 will eventually fix that. Signed-off-by: Philip Withnall <withnall@endlessm.com> Fixes: #487
This commit is contained in:
parent
8d19b95bd8
commit
197eff3fc8
@ -111,6 +111,40 @@ G_DISABLE_ASSERT:
|
|||||||
- "_build/meson-logs"
|
- "_build/meson-logs"
|
||||||
- "_build/${CI_JOB_NAME}-report.xml"
|
- "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
|
||||||
|
valgrind:
|
||||||
|
image: registry.gitlab.gnome.org/gnome/glib/fedora:v3
|
||||||
|
stage: analysis
|
||||||
|
except:
|
||||||
|
- tags
|
||||||
|
variables:
|
||||||
|
MESON_TEST_TIMEOUT_MULTIPLIER: 10
|
||||||
|
script:
|
||||||
|
- meson ${MESON_COMMON_OPTIONS}
|
||||||
|
--werror
|
||||||
|
-Dsystemtap=true
|
||||||
|
-Ddtrace=true
|
||||||
|
-Dfam=true
|
||||||
|
-Dinstalled_tests=true
|
||||||
|
_build
|
||||||
|
- ninja -C _build
|
||||||
|
- bash -x ./.gitlab-ci/run-tests.sh
|
||||||
|
--log-file _build/meson-logs/testlog-valgrind.json
|
||||||
|
--wrap "valgrind --tool=memcheck --error-exitcode=1 --track-origins=yes --leak-check=full --leak-resolution=high --num-callers=50 --show-leak-kinds=definite,possible --show-error-list=yes --suppressions=${CI_PROJECT_DIR}/glib.supp"
|
||||||
|
--no-suite no-valgrind
|
||||||
|
--no-suite slow
|
||||||
|
# FIXME: Remove this when we have zero valgrind leaks.
|
||||||
|
# https://gitlab.gnome.org/GNOME/glib/issues/333
|
||||||
|
allow_failure: true
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: "_build/${CI_JOB_NAME}-report.xml"
|
||||||
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||||
|
when: always
|
||||||
|
paths:
|
||||||
|
- "_build/config.h"
|
||||||
|
- "_build/glib/glibconfig.h"
|
||||||
|
- "_build/meson-logs"
|
||||||
|
|
||||||
.cross-template: &cross-template
|
.cross-template: &cross-template
|
||||||
stage: build
|
stage: build
|
||||||
except:
|
except:
|
||||||
|
@ -2,10 +2,21 @@
|
|||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--log-file)
|
||||||
|
log_file="$2"
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
log_file="_build/meson-logs/testlog.json"
|
||||||
|
esac
|
||||||
|
|
||||||
meson test \
|
meson test \
|
||||||
-C _build \
|
-C _build \
|
||||||
--timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} \
|
--timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} \
|
||||||
--no-suite flaky
|
--no-suite flaky \
|
||||||
|
"$@"
|
||||||
|
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
|
|
||||||
@ -13,6 +24,6 @@ python3 .gitlab-ci/meson-junit-report.py \
|
|||||||
--project-name=glib \
|
--project-name=glib \
|
||||||
--job-id "${CI_JOB_NAME}" \
|
--job-id "${CI_JOB_NAME}" \
|
||||||
--output "_build/${CI_JOB_NAME}-report.xml" \
|
--output "_build/${CI_JOB_NAME}-report.xml" \
|
||||||
_build/meson-logs/testlog.json
|
"${log_file}"
|
||||||
|
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
|
Loading…
x
Reference in New Issue
Block a user