aboutsummaryrefslogtreecommitdiffstats
path: root/t/unit-tests
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-12-23 09:32:24 -0800
committerJunio C Hamano <gitster@pobox.com>2024-12-23 09:32:25 -0800
commit83c8f7623538e67262db18c98d9c1da6b50e289d (patch)
tree5e317bedaa760e01fda2f8fdd85d54a44f4ee79c /t/unit-tests
parente9a405432078b6070ee8265cdce56faaf21fac03 (diff)
parenteab5dbab92fa60298aa4a1952fcbc6cae824d939 (diff)
downloadgit-83c8f7623538e67262db18c98d9c1da6b50e289d.tar.gz
Merge branch 'ps/ci-meson'
The meson-build procedure is integrated into CI to catch and prevent bitrotting. * ps/ci-meson: ci: wire up Meson builds t: introduce compatibility options to clar-based tests t: fix out-of-tree tests for some git-p4 tests Makefile: detect missing Meson tests meson: detect missing tests at configure time t/unit-tests: rename clar-based unit tests to have a common prefix Makefile: drop -DSUPPRESS_ANNOTATED_LEAKS ci/lib: support custom output directories when creating test artifacts
Diffstat (limited to 't/unit-tests')
-rwxr-xr-xt/unit-tests/generate-clar-decls.sh5
-rw-r--r--t/unit-tests/u-ctype.c (renamed from t/unit-tests/ctype.c)0
-rw-r--r--t/unit-tests/u-strvec.c (renamed from t/unit-tests/strvec.c)0
-rw-r--r--t/unit-tests/unit-test.c19
4 files changed, 22 insertions, 2 deletions
diff --git a/t/unit-tests/generate-clar-decls.sh b/t/unit-tests/generate-clar-decls.sh
index 688e0885f4..3b315c64b3 100755
--- a/t/unit-tests/generate-clar-decls.sh
+++ b/t/unit-tests/generate-clar-decls.sh
@@ -11,6 +11,9 @@ shift
for suite in "$@"
do
- sed -ne "s/^\(void test_$(basename "${suite%.c}")__[a-zA-Z_0-9][a-zA-Z_0-9]*(void)\)$/extern \1;/p" "$suite" ||
+ suite_name=$(basename "$suite")
+ suite_name=${suite_name%.c}
+ suite_name=${suite_name#u-}
+ 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"
diff --git a/t/unit-tests/ctype.c b/t/unit-tests/u-ctype.c
index 32e65867cd..32e65867cd 100644
--- a/t/unit-tests/ctype.c
+++ b/t/unit-tests/u-ctype.c
diff --git a/t/unit-tests/strvec.c b/t/unit-tests/u-strvec.c
index e66b7bbfae..e66b7bbfae 100644
--- a/t/unit-tests/strvec.c
+++ b/t/unit-tests/u-strvec.c
diff --git a/t/unit-tests/unit-test.c b/t/unit-tests/unit-test.c
index a474cdcfd3..fa8818842a 100644
--- a/t/unit-tests/unit-test.c
+++ b/t/unit-tests/unit-test.c
@@ -18,8 +18,25 @@ int cmd_main(int argc, const char **argv)
N_("immediately exit upon the first failed test")),
OPT_STRING_LIST('r', "run", &run_args, N_("suite[::test]"),
N_("run only test suite or individual test <suite[::test]>")),
- OPT_STRING_LIST('x', "exclude", &exclude_args, N_("suite"),
+ OPT_STRING_LIST(0, "exclude", &exclude_args, N_("suite"),
N_("exclude test suite <suite>")),
+ /*
+ * Compatibility wrappers so that we don't have to filter
+ * options understood by integration tests.
+ */
+ OPT_NOOP_NOARG('d', "debug"),
+ OPT_NOOP_NOARG(0, "github-workflow-markup"),
+ OPT_NOOP_NOARG(0, "no-bin-wrappers"),
+ OPT_NOOP_ARG(0, "root"),
+ OPT_NOOP_ARG(0, "stress"),
+ OPT_NOOP_NOARG(0, "tee"),
+ OPT_NOOP_NOARG(0, "with-dashes"),
+ OPT_NOOP_ARG(0, "valgrind"),
+ OPT_NOOP_ARG(0, "valgrind-only"),
+ OPT_NOOP_NOARG('v', "verbose"),
+ OPT_NOOP_NOARG('V', "verbose-log"),
+ OPT_NOOP_ARG(0, "verbose-only"),
+ OPT_NOOP_NOARG('x', NULL),
OPT_END(),
};
struct strvec args = STRVEC_INIT;