Asterisk 20: questions on unit tests

Hello,

I’ve downloaded Asterisk 20.0.0 source archive on a Debian Bookworm host.
For the sake of it, I enabled TEST_FRAMEWORK (following steps in (1]) and ran “test execute all” using CLI.
as I didn’t want to select all individual test modules, I only selected one before running make && make install.

  1. Some tests seem to fail. Is this something that should be cared about ?
START  /funcs/func_strings/ - func_STRREPLACE_test 
[Jan 10 11:54:09] ERROR[22477]: func_strings.c:943 strreplace: Usage: STRREPLACE(<varname>,<find-string>[,<replace-string>,[<max-replacements>]])
[Jan 10 11:54:09] ERROR[22477]: func_strings.c:956 strreplace: No <find-string> specified
END    /funcs/func_strings/ - func_STRREPLACE_test Time: <1ms Result: PASS

  1. Is there an easy way to enable all test modules in menuselect ?
    The best I could think of is listing of menuselect options (with --list-options) and greping strings starting with test.

[1] How To: Unit Testing Asterisk ⋆ Asterisk

Best regards

That’s not a failure. The test passed. Things under test can and will output errors/warnings if fed invalid data, which unit tests can and will do.

You would use menuselect[1] to enable the category MENUSELECT_TESTS.

[1] Using Menuselect to Select Asterisk Options - Asterisk Project - Asterisk Project Wiki

Thanks for all !
i could positively use this MENUSELECT_TESTS category and run some tests.