test: Split cppcheck and clang-tidy tests into different files

Both clang-tidy and cppcheck linting are handled by the same test file,
test/build/static_checkers.  The two linters are independent of each other
though, and each one takes quite a long time.  Split them into separate
files to make it easier to control which are executed from the top level
test script.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2022-08-18 16:13:50 +10:00 committed by Stefano Brivio
parent a8598c7e70
commit c8756034b7
3 changed files with 20 additions and 5 deletions

View file

@ -11,10 +11,7 @@
# Copyright (c) 2021 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
htools clang-tidy cppcheck
htools clang-tidy
test Run clang-tidy
host make clang-tidy
test Run cppcheck
host make cppcheck

17
test/build/cppcheck Normal file
View file

@ -0,0 +1,17 @@
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# PASST - Plug A Simple Socket Transport
# for qemu/UNIX domain socket mode
#
# PASTA - Pack A Subtle Tap Abstraction
# for network namespace/tap device mode
#
# test/build/cppcheck - Run source through cppcheck(1) linter
#
# Copyright (c) 2021 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
htools cppcheck
test Run cppcheck
host make cppcheck

View file

@ -61,7 +61,8 @@ run() {
setup build
test build/all
test build/static_checkers
test build/cppcheck
test build/clang_tidy
test distro/debian
test distro/fedora
test distro/opensuse