mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
ci: Exclude tests from scan-build analysis runs
They cause too much noise at the moment. I want to make scan-build messages fatal, and with 66 of 238 reports coming from the tests, that’s not currently feasible. Signed-off-by: Philip Withnall <pwithnall@gnome.org> Helps: #1767
This commit is contained in:
parent
4607dd77a1
commit
2dfd9518e1
@ -725,6 +725,16 @@ scan-build:
|
|||||||
image: $FEDORA_IMAGE
|
image: $FEDORA_IMAGE
|
||||||
stage: analysis
|
stage: analysis
|
||||||
needs: []
|
needs: []
|
||||||
|
variables:
|
||||||
|
# FIXME: Eventually we want static analysis on the tests, for code quality,
|
||||||
|
# but for the moment it’s just busywork.
|
||||||
|
SCAN_BUILD_FLAGS: >-
|
||||||
|
--exclude gio/tests/
|
||||||
|
--exclude girepository/tests/
|
||||||
|
--exclude glib/tests/
|
||||||
|
--exclude gmodule/tests/
|
||||||
|
--exclude gobject/tests/
|
||||||
|
--exclude gthread/tests/
|
||||||
script:
|
script:
|
||||||
- meson setup ${MESON_COMMON_OPTIONS}
|
- meson setup ${MESON_COMMON_OPTIONS}
|
||||||
--werror
|
--werror
|
||||||
@ -737,7 +747,7 @@ scan-build:
|
|||||||
-Dinstalled_tests=true
|
-Dinstalled_tests=true
|
||||||
-Dintrospection=enabled
|
-Dintrospection=enabled
|
||||||
_scan_build
|
_scan_build
|
||||||
- ninja -C _scan_build scan-build
|
- SCANBUILD="$(pwd)/.gitlab-ci/scan-build.sh" ninja -C _scan_build scan-build
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
||||||
when: always
|
when: always
|
||||||
|
15
.gitlab-ci/scan-build.sh
Executable file
15
.gitlab-ci/scan-build.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Copyright 2024 GNOME Foundation, Inc.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
#
|
||||||
|
# Original author: Philip Withnall
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# This script just exists so that we can set the scan-build flags in
|
||||||
|
# .gitlab-ci.yml and pass them into Meson’s `scan-build` target.
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
exec scan-build ${SCAN_BUILD_FLAGS:-} "$@"
|
Loading…
Reference in New Issue
Block a user