From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 049355A0282 for ; Tue, 16 May 2023 04:01:47 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4QKzxd0tsHz4x4h; Tue, 16 May 2023 12:01:41 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1684202501; bh=FtLJ02nN0wMKF+rdQU9rIdgfM+RYSz+jGiifdkoLTmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=StUz40zF5S7ZkY8HIvwW6MzR+gFrq1E5o6v+WmLsFu4/GWYnyHRJUydNDoHColf+N RH/vcTjzkSr8Z1RQAC9rLVv+7bf7+4qI5Qlj8w4JsnutLZnu7Q40nmtfcl4BNsA0zv Ggfiz5RvhgZ0TjlGHX6UYQr2ImPWZfWhgy2q2mSk= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 05/21] avocado: Move static checkers to avocado Date: Tue, 16 May 2023 12:01:19 +1000 Message-Id: <20230516020135.1901256-6-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230516020135.1901256-1-david@gibson.dropbear.id.au> References: <20230516020135.1901256-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 4GIVVAATBKHBQGQXH4CFINRW55EREX5H X-Message-ID-Hash: 4GIVVAATBKHBQGQXH4CFINRW55EREX5H X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: jarichte@redhat.com, Cleber Rosa , David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Move these, the simplest of our tests, to be run from avocado rather than our hand-rolled test harness. Signed-off-by: David Gibson --- Makefile | 9 +++++++++ avocado/static_checkers/clang-tidy.sh | 3 +++ avocado/static_checkers/cppcheck.sh | 3 +++ oldtest/run | 4 ++-- test/build/clang_tidy | 17 ----------------- test/build/cppcheck | 17 ----------------- test/run | 2 -- 7 files changed, 17 insertions(+), 38 deletions(-) create mode 100755 avocado/static_checkers/clang-tidy.sh create mode 100755 avocado/static_checkers/cppcheck.sh delete mode 100644 test/build/clang_tidy delete mode 100644 test/build/cppcheck diff --git a/Makefile b/Makefile index a5256f5..d2daaa1 100644 --- a/Makefile +++ b/Makefile @@ -294,3 +294,12 @@ cppcheck: $(SRCS) $(HEADERS) --suppress=unusedStructMember \ $(filter -D%,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) \ . + +AVOCADO = avocado + +.PHONY: avocado +avocado: + $(AVOCADO) run avocado + +check: avocado + $(MAKE) -C test check diff --git a/avocado/static_checkers/clang-tidy.sh b/avocado/static_checkers/clang-tidy.sh new file mode 100755 index 0000000..67bcf27 --- /dev/null +++ b/avocado/static_checkers/clang-tidy.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +make clang-tidy diff --git a/avocado/static_checkers/cppcheck.sh b/avocado/static_checkers/cppcheck.sh new file mode 100755 index 0000000..2c6d396 --- /dev/null +++ b/avocado/static_checkers/cppcheck.sh @@ -0,0 +1,3 @@ +#! /bin/sh + +make cppcheck diff --git a/oldtest/run b/oldtest/run index 75309f6..56fcd1b 100755 --- a/oldtest/run +++ b/oldtest/run @@ -66,8 +66,8 @@ run() { setup build # test build/all -# test build/cppcheck -# test build/clang_tidy + test build/cppcheck + test build/clang_tidy teardown build # setup pasta diff --git a/test/build/clang_tidy b/test/build/clang_tidy deleted file mode 100644 index 40573bf..0000000 --- a/test/build/clang_tidy +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: GPL-2.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/clang_tidy - Run source through clang-tidy(1) linter -# -# Copyright (c) 2021 Red Hat GmbH -# Author: Stefano Brivio - -htools clang-tidy - -test Run clang-tidy -host make clang-tidy diff --git a/test/build/cppcheck b/test/build/cppcheck deleted file mode 100644 index 0e1dbce..0000000 --- a/test/build/cppcheck +++ /dev/null @@ -1,17 +0,0 @@ -# SPDX-License-Identifier: GPL-2.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 8f4f845..ce24f44 100755 --- a/test/run +++ b/test/run @@ -66,8 +66,6 @@ run() { setup build test build/all - test build/cppcheck - test build/clang_tidy teardown build setup pasta -- 2.40.1