From: Seyi Kuforiji <kuforiji98@gmail•com>
To: git@vger•kernel.org
Cc: ps@pks•im, phillip.wood@dunelm•org.uk,
Seyi Kuforiji <kuforiji98@gmail•com>
Subject: [PATCH v2 1/4] t/unit-tests: handle dashes in test suite filenames
Date: Thu, 16 Jan 2025 17:15:56 +0100 [thread overview]
Message-ID: <20250116161559.91038-2-kuforiji98@gmail.com> (raw)
In-Reply-To: <20250116161559.91038-1-kuforiji98@gmail.com>
The script is designed to extract function signatures that match a
specific pattern derived from the unit test file's name.
`generate-clar-decls.sh` does not pick up dashes in filenames, which
prevents the scripts from being run.
Adapt script to translate dashes (`-`) in test suite filenames to
underscores (`_`) to correctly extract the function signatures and run
the corresponding tests. This will be used by subsequent commits which
follows the same construct.
Mentored-by: Patrick Steinhardt <ps@pks•im>
Signed-off-by: Seyi Kuforiji <kuforiji98@gmail•com>
---
t/unit-tests/generate-clar-decls.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/unit-tests/generate-clar-decls.sh b/t/unit-tests/generate-clar-decls.sh
index 3b315c64b3..abf6a2ea2a 100755
--- a/t/unit-tests/generate-clar-decls.sh
+++ b/t/unit-tests/generate-clar-decls.sh
@@ -14,6 +14,7 @@ do
suite_name=$(basename "$suite")
suite_name=${suite_name%.c}
suite_name=${suite_name#u-}
+ suite_name=$(echo "$suite_name" | tr '-' '_')
sed -ne "s/^\(void test_${suite_name}__[a-zA-Z_0-9][a-zA-Z_0-9]*(void)\)$/extern \1;/p" "$suite" ||
exit 1
done >"$OUTPUT"
--
2.34.1
next prev parent reply other threads:[~2025-01-16 16:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 10:49 [PATCH 0/4] t/unit-tests: convert unit-tests to use clar Seyi Kuforiji
2025-01-16 10:49 ` [PATCH 1/4] t/unit-tests: handle dashes in test suite filenames Seyi Kuforiji
2025-01-16 13:12 ` Patrick Steinhardt
2025-01-16 10:49 ` [PATCH 2/4] t/unit-tests: convert mem-pool test to use clar test framework Seyi Kuforiji
2025-01-16 13:12 ` Patrick Steinhardt
2025-01-16 17:45 ` Junio C Hamano
2025-01-16 10:49 ` [PATCH 3/4] t/unit-tests: adapt priority queue " Seyi Kuforiji
2025-01-16 13:13 ` Patrick Steinhardt
2025-01-16 10:49 ` [PATCH 4/4] t/unit-tests: convert reftable tree " Seyi Kuforiji
2025-01-16 16:15 ` [PATCH v2 0/4] t/unit-tests: convert unit-tests to use clar Seyi Kuforiji
2025-01-16 16:15 ` Seyi Kuforiji [this message]
2025-01-17 6:27 ` [PATCH v2 1/4] t/unit-tests: handle dashes in test suite filenames Patrick Steinhardt
2025-01-16 16:15 ` [PATCH v2 2/4] t/unit-tests: convert mem-pool test to use clar test framework Seyi Kuforiji
2025-01-16 16:15 ` [PATCH v2 3/4] t/unit-tests: adapt priority queue " Seyi Kuforiji
2025-01-16 16:15 ` [PATCH v2 4/4] t/unit-tests: convert reftable tree " Seyi Kuforiji
2025-01-17 6:27 ` [PATCH v2 0/4] t/unit-tests: convert unit-tests to use clar Patrick Steinhardt
2025-01-17 12:29 ` Seyi Kuforiji
2025-01-17 12:29 ` [PATCH v3 1/4] t/unit-tests: handle dashes in test suite filenames Seyi Kuforiji
2025-01-17 12:29 ` [PATCH v3 2/4] t/unit-tests: convert mem-pool test to use clar test framework Seyi Kuforiji
2025-01-20 10:18 ` Karthik Nayak
2025-01-17 12:29 ` [PATCH v3 3/4] t/unit-tests: adapt priority queue " Seyi Kuforiji
2025-01-20 10:22 ` Karthik Nayak
2025-01-17 12:29 ` [PATCH v3 4/4] t/unit-tests: convert reftable tree " Seyi Kuforiji
2025-01-17 13:36 ` t/unit-tests: convert unit-tests to use clar Patrick Steinhardt
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=20250116161559.91038-2-kuforiji98@gmail.com \
--to=kuforiji98@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=phillip.wood@dunelm$(echo .)org.uk \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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