CMSIS-DSP: Add new compilation flag to DSP_Lib_TestSuite to restore

default behavior.

Default behavior is that all tests are enabled by default.
No need to define new compilation flags to enable them.

But there is a new mode which when enabled will allow to select which
tests must be run or not.

By default, this new mode is disabled and in this case all tests will
run.
pull/19/head
Christophe Favergeon 7 years ago
parent 2bb1ccfae7
commit bac5c674cf

@ -6,6 +6,7 @@ set(MATRIXCHECK ON)
set(FASTMATHCOMPUTATIONS OFF)
option(DUMPPATTERN "Dump test patterns when test is failing" ON)
option(CUSTOMIZE_TESTS "Enable customizations of tests" ON)
option(BASICMATH_TESTS "Enable Basic Math testing" ON)
option(COMPLEXMATH_TESTS "Enable Complex Math testing" ON)
option(CONTROLLER_TESTS "Enable Controller testing" ON)
@ -75,6 +76,10 @@ add_subdirectory(RefLibs bin_ref)
add_executable(DSP_Lib_TestSuite)
if (CUSTOMIZE_TESTS)
target_compile_definitions(DSP_Lib_TestSuite PRIVATE CUSTOMIZE_TESTS)
endif()
if (BASICMATH_TESTS)
target_compile_definitions(DSP_Lib_TestSuite PRIVATE ENABLE_BASICMATH_TESTS)
endif()

@ -15,46 +15,46 @@ JTEST_DEFINE_GROUP(all_tests)
/*
To skip a test, comment it out
*/
#if defined(ENABLE_BASICMATH_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_BASICMATH_TESTS)
JTEST_GROUP_CALL(basic_math_tests);
#endif
#if defined(ENABLE_COMPLEXMATH_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_COMPLEXMATH_TESTS)
JTEST_GROUP_CALL(complex_math_tests);
#endif
#if defined(ENABLE_CONTROLLER_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_CONTROLLER_TESTS)
JTEST_GROUP_CALL(controller_tests);
#endif
#if defined(ENABLE_FASTMATH_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_FASTMATH_TESTS)
JTEST_GROUP_CALL(fast_math_tests);
#endif
#if defined(ENABLE_FILTERING_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_FILTERING_TESTS)
/* Biquad df2T_f32 will fail with Neon. The test must be updated.
Neon implementation is requiring a different initialization.
*/
JTEST_GROUP_CALL(filtering_tests);
#endif
#if defined(ENABLE_MATRIX_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_MATRIX_TESTS)
JTEST_GROUP_CALL(matrix_tests);
#endif
#if defined(ENABLE_STATISTICS_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_STATISTICS_TESTS)
JTEST_GROUP_CALL(statistics_tests);
#endif()
#if defined(ENABLE_SUPPORT_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_SUPPORT_TESTS)
JTEST_GROUP_CALL(support_tests);
#endif
#if defined(ENABLE_TRANSFORM_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_TRANSFORM_TESTS)
JTEST_GROUP_CALL(transform_tests);
#endif
#if defined(ENABLE_INTRINSICS_TESTS)
#if !defined(CUSTOMIZE_TESTS) || defined(ENABLE_INTRINSICS_TESTS)
JTEST_GROUP_CALL(intrinsics_tests);
#endif

Loading…
Cancel
Save