ci: Run clang scan-build test as part of CI
This commit is contained in:
parent
9db89e00d0
commit
0a08a6a7c0
3 changed files with 22 additions and 0 deletions
|
@ -75,6 +75,23 @@ test_valgrind:
|
||||||
- ninja -C _build
|
- ninja -C _build
|
||||||
- meson test -C _build --verbose --no-stdsplit --setup=valgrind
|
- meson test -C _build --verbose --no-stdsplit --setup=valgrind
|
||||||
|
|
||||||
|
test_scan_build:
|
||||||
|
stage: test
|
||||||
|
except:
|
||||||
|
variables:
|
||||||
|
- $CI_PIPELINE_SOURCE == "schedule"
|
||||||
|
allow_failure: true
|
||||||
|
script:
|
||||||
|
- meson -Ddrivers=all . _build
|
||||||
|
# This is ugly, the wrapper disables the malloc checker
|
||||||
|
- SCANBUILD=$CI_PROJECT_DIR/.gitlab-ci/scan-build ninja -C _build scan-build
|
||||||
|
# Check that the directory is empty
|
||||||
|
- "! ls -A _build/meson-logs/scanbuild | grep -q ."
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- _build/meson-logs
|
||||||
|
expire_in: 1 week
|
||||||
|
|
||||||
test_indent:
|
test_indent:
|
||||||
stage: check-source
|
stage: check-source
|
||||||
except:
|
except:
|
||||||
|
|
|
@ -24,3 +24,4 @@
|
||||||
umockdev
|
umockdev
|
||||||
uncrustify
|
uncrustify
|
||||||
valgrind
|
valgrind
|
||||||
|
clang-analyzer
|
||||||
|
|
4
.gitlab-ci/scan-build
Executable file
4
.gitlab-ci/scan-build
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# This wrapper just disables the malloc checker
|
||||||
|
exec /usr/bin/scan-build -disable-checker unix.Malloc "$@"
|
Loading…
Reference in a new issue