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
This commit is contained in:
Junio C Hamano
2024-12-23 09:32:24 -08:00
17 changed files with 195 additions and 74 deletions

View File

@ -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"

View File

@ -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;