From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id A74935A0271 for ; Thu, 20 Apr 2023 03:11:25 +0200 (CEST) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Q203Y6DNQz4xKb; Thu, 20 Apr 2023 11:11:21 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1681953081; bh=oPg+lGwAozDFBiGYhcvDQfsha9BGYO6slFFmSZFw140=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bYud+qFdZRzGomUTuVf/q/YNJZdUoPBJDgXbPvm2bSWgidEs4gdqCWQkXyMe/5+fe 8+IoO03Aknp5PiYoM4LQFJ0LjkUmlsoeXwx6QuuBdTaz6g1rc/11Yn7sRCwr03D4RU 4H5ajHH/ztic/v2inX2CnGHQXy7heX0PzcwKddHs= From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 3/7] avocado: Move static checkers to avocado Date: Thu, 20 Apr 2023 11:11:04 +1000 Message-Id: <20230420011108.494181-4-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230420011108.494181-1-david@gibson.dropbear.id.au> References: <20230420011108.494181-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: VS4YTK23IXBHK7MNBKRATAE5AWPM24BQ X-Message-ID-Hash: VS4YTK23IXBHK7MNBKRATAE5AWPM24BQ 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: 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 | 10 ++++++++++ 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, 18 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..0fd9fe9 100644 --- a/Makefile +++ b/Makefile @@ -294,3 +294,13 @@ cppcheck: $(SRCS) $(HEADERS) --suppress=unusedStructMember \ $(filter -D%,$(FLAGS) $(CFLAGS) $(CPPFLAGS)) \ . + +AVOCADO = avocado + +.PHONY: avocado +avocado: + $(MAKE) -C test + $(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.0