test: introduce (mini) unit test framework
Lightweight unit testing framework, providing a structured way to define, execute, and report tests. It includes a central test registry, a flexible command-line argument parser of the form "--key=value" / "-k=value" / "-key=value" (facilitating future framework extensions), ability to run tests in parallel and accumulated test time logging reports. So far the supported command-line args are: - "--jobs=<num>" or "-j=<num>" to specify the number of parallel workers. - "--seed=<hex>" to specify the RNG seed (random if not set). - "--iterations=<num>" or "-i=<num>" to specify the number of iterations. Compatibility Note: To stay compatible with previous versions, the framework also supports the two original positional arguments: the iterations count and the RNG seed (in that order).
This commit is contained in:
@@ -443,6 +443,14 @@ if test x"$enable_experimental" = x"no"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for concurrency support (tests only)
|
||||
if test "x$enable_tests" != x"no"; then
|
||||
AC_CHECK_HEADERS([sys/types.h sys/wait.h unistd.h])
|
||||
AS_IF([test "x$ac_cv_header_sys_types_h" = xyes && test "x$ac_cv_header_sys_wait_h" = xyes &&
|
||||
test "x$ac_cv_header_unistd_h" = xyes], [TEST_DEFINES="-DSUPPORTS_CONCURRENCY=1"], TEST_DEFINES="")
|
||||
AC_SUBST(TEST_DEFINES)
|
||||
fi
|
||||
|
||||
###
|
||||
### Generate output
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user