From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson To: passt-dev@passt.top Subject: [PATCH 02/10] test: Split cppcheck and clang-tidy tests into different files Date: Thu, 18 Aug 2022 16:13:50 +1000 Message-ID: <20220818061358.1775944-3-david@gibson.dropbear.id.au> In-Reply-To: <20220818061358.1775944-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8423940456750908722==" --===============8423940456750908722== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 --- test/build/{static_checkers => clang_tidy} | 5 +---- test/build/cppcheck | 17 +++++++++++++++++ test/run | 3 ++- 3 files changed, 20 insertions(+), 5 deletions(-) rename test/build/{static_checkers => clang_tidy} (86%) create mode 100644 test/build/cppcheck diff --git a/test/build/static_checkers b/test/build/clang_tidy similarity index 86% rename from test/build/static_checkers rename to test/build/clang_tidy index 34c8dff..0ead9e8 100644 --- a/test/build/static_checkers +++ b/test/build/clang_tidy @@ -11,10 +11,7 @@ # Copyright (c) 2021 Red Hat GmbH # Author: Stefano Brivio -htools clang-tidy cppcheck +htools clang-tidy test Run clang-tidy host make clang-tidy - -test Run cppcheck -host make cppcheck diff --git a/test/build/cppcheck b/test/build/cppcheck new file mode 100644 index 0000000..05166dd --- /dev/null +++ b/test/build/cppcheck @@ -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 + +htools cppcheck + +test Run cppcheck +host make cppcheck diff --git a/test/run b/test/run index 3e5d56b..258a89b 100755 --- a/test/run +++ b/test/run @@ -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 -- 2.37.2 --===============8423940456750908722==--