From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH 2/2] devtools: check for tests added without a test suite
Date: Fri, 15 Sep 2023 12:52:06 +0100 [thread overview]
Message-ID: <20230915115206.132198-3-bruce.richardson@intel.com> (raw)
In-Reply-To: <20230915115206.132198-1-bruce.richardson@intel.com>
Add a check in checkpatches.sh for the use of the old
REGISTER_TEST_COMMAND macro, which just adds a test without including it
in a test suite. Suggest to the user to add the test using the newer
macros which will include the test in a test suite.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
devtools/checkpatches.sh | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 55fabc5458..9b201db0a2 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -159,6 +159,14 @@ check_forbidden_additions() { # <patch>
-f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
"$1" || res=1
+ # prevent addition of tests not in one of our test suites
+ awk -v FOLDERS='app/test' \
+ -v EXPRESSIONS='REGISTER_TEST_COMMAND' \
+ -v RET_ON_FAIL=1 \
+ -v MESSAGE='Using REGISTER_TEST_COMMAND instead of REGISTER_<suite_name>_TEST' \
+ -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \
+ "$1" || res=1
+
# SVG must be included with wildcard extension to allow conversion
awk -v FOLDERS='doc' \
-v EXPRESSIONS='::[[:space:]]*[^[:space:]]*\\.svg' \
--
2.39.2
next prev parent reply other threads:[~2023-09-15 11:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 11:52 [PATCH 0/2] add checks for tests not in a suite Bruce Richardson
2023-09-15 11:52 ` [PATCH 1/2] app/test: emit warning for tests not in a test suite Bruce Richardson
2023-09-15 11:52 ` Bruce Richardson [this message]
2023-09-15 11:55 ` [PATCH 0/2] add checks for tests not in a suite Bruce Richardson
2023-09-19 8:29 ` David Marchand
2023-09-19 8:36 ` Bruce Richardson
2023-09-19 9:07 ` David Marchand
2023-09-26 15:01 ` Aaron Conole
2023-09-27 6:30 ` David Marchand
2023-09-27 8:26 ` Bruce Richardson
2023-09-27 9:31 ` David Marchand
2023-09-27 9:56 ` Bruce Richardson
2023-09-27 14:00 ` Aaron Conole
2023-10-02 9:35 ` David Marchand
2023-10-02 9:35 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230915115206.132198-3-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).