mirror of
https://github.com/cuberite/libdeflate.git
synced 2025-09-08 11:50:00 -04:00
scripts, Makefile: move static_analysis_tests to a Makefile target
To further trim down run_tests.sh, move the code that runs the clang static analyzer into a 'make' target.
This commit is contained in:
parent
14a5617b70
commit
c583b0a70c
@ -22,7 +22,8 @@ matrix:
|
||||
- sudo apt-get install -y libz-dev gcc-multilib libz-dev:i386
|
||||
libc6-dev-i386 clang
|
||||
script:
|
||||
- scripts/run_tests.sh checksum_benchmarks static_analysis
|
||||
- scripts/run_tests.sh checksum_benchmarks
|
||||
- make scan-build
|
||||
|
||||
- name: Native tests (Linux aarch64)
|
||||
os: linux
|
||||
@ -40,7 +41,8 @@ matrix:
|
||||
before_install:
|
||||
- sudo apt-get install -y libz-dev clang
|
||||
script:
|
||||
- scripts/run_tests.sh checksum_benchmarks static_analysis
|
||||
- scripts/run_tests.sh checksum_benchmarks
|
||||
- make scan-build
|
||||
|
||||
- name: gzip and cross-compile-for-Windows tests (Linux)
|
||||
os: linux
|
||||
|
7
Makefile
7
Makefile
@ -324,6 +324,10 @@ check:test_programs
|
||||
./$$prog || exit 1; \
|
||||
done
|
||||
|
||||
# Run the clang static analyzer.
|
||||
scan-build:
|
||||
scan-build --status-bugs make all test_programs
|
||||
|
||||
help:
|
||||
@echo "Available targets:"
|
||||
@echo "------------------"
|
||||
@ -346,6 +350,7 @@ realclean: clean
|
||||
|
||||
FORCE:
|
||||
|
||||
.PHONY: all install uninstall test_programs help clean realclean
|
||||
.PHONY: all install uninstall test_programs check scan-build help \
|
||||
clean realclean
|
||||
|
||||
.DEFAULT_GOAL = all
|
||||
|
@ -239,17 +239,6 @@ windows_tests() {
|
||||
|
||||
###############################################################################
|
||||
|
||||
static_analysis_tests() {
|
||||
test_group_included static_analysis || return 0
|
||||
if ! type -P scan-build > /dev/null; then
|
||||
log_skip "clang static analyzer (scan-build) not found"
|
||||
return 0
|
||||
fi
|
||||
run_cmd scan-build --status-bugs make -j$NPROC all test_programs
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
||||
gzip_tests() {
|
||||
test_group_included gzip || return 0
|
||||
|
||||
@ -288,7 +277,6 @@ native_tests
|
||||
freestanding_tests
|
||||
checksum_benchmarks
|
||||
windows_tests
|
||||
static_analysis_tests
|
||||
gzip_tests
|
||||
|
||||
if (( TESTS_SKIPPED )); then
|
||||
|
Loading…
x
Reference in New Issue
Block a user