mutter/.gitlab-ci.yml
Marco Trevisan (Treviño) e96136e418 gitlab-ci: Use MALLOC_CHECK_ and MALLOC_PERTURB_ env variables in tests
Linux glibc supports a malloc implementation that is allows to be tunable using
environment variables, to check allocation issues.

When MALLOC_CHECK_ is set to 3, a diagnostic message is printed on stderr and
the program is aborted.

Setting the MALLOC_PERTURB_ environment variable causes the malloc functions in
to return memory which has been wiped and initialized with the byte value of the
environment variable.

So use this features when running tests in order to catch better memory errors.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/578
2019-05-16 21:30:36 +00:00

63 lines
1.4 KiB
YAML

image: registry.gitlab.gnome.org/gnome/mutter/master:v1
stages:
- review
- build
- test
check-commit-log:
stage: review
variables:
GIT_DEPTH: "100"
script:
- ./.gitlab-ci/check-commit-log.sh
only:
- merge_requests
build-mutter:
stage: build
script:
- meson . build -Dbuildtype=debugoptimized -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
- ninja -C build
- ninja -C build install
artifacts:
expire_in: 1 day
paths:
- build
only:
- merge_requests
- /^.*$/
test-mutter:
stage: test
dependencies:
- build-mutter
variables:
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data"
MALLOC_CHECK_: "3"
script:
- mkdir -m 700 $XDG_RUNTIME_DIR
- glib-compile-schemas $GSETTINGS_SCHEMA_DIR
- >
env MALLOC_PERTURB_="$((RANDOM % 256 + 1))"
dbus-run-session -- xvfb-run -s '+iglx -noreset'
meson test -C build --no-rebuild -t 10 --verbose --no-stdsplit --wrap catchsegv
only:
- merge_requests
- /^.*$/
can-build-gnome-shell:
stage: test
dependencies:
- build-mutter
before_script:
- meson install --no-rebuild -C build
script:
- .gitlab-ci/checkout-gnome-shell.sh
- meson gnome-shell gnome-shell/build --prefix /usr
- ninja -C gnome-shell/build install
only:
- merge_requests
- /^.*$/