Commit Graph

123 Commits

Author SHA1 Message Date
Andrey Volk fd27504a7d [Core] Add switch_digest(), switch_digest_string() APIs. Add unit-tests. 2021-04-12 01:03:15 +03:00
Chris Rienzo e3a6ec86f8 [core] Update switch_ivr_enterprise_originate() to accept optional switch_dial_handle_list_t instead of dialstring. 2021-03-23 20:23:28 +03:00
Andrey Volk eaf5a70246 [Unit-tests] Fix build issues in switch_eavesdrop.c test file. 2021-03-17 01:15:42 +03:00
Andrey Volk 3065cb9168 [mod_sofia] Fix memory leaks caused by improper profile destroy. Add a unit-test. 2021-03-17 00:58:29 +03:00
Dragos Oancea 5aabb54f68 [core] eavesdrop: init L16 codec at right ptime in certain conditions.
[core] eavesdrop: avoid eavesdropping on itself and return error.

[core] eavesdrop: adjust buffer operations for ptime mismatch and for when ptimes are the same.

[core] eavesdrop: add buffering based on LCM (Least Common Multiple) when ptime mismatch,
and have audio write thread enabled when ptime eavesdropee < ptime eavesdropper.

[unit-tests] add unit-tests for eavesdrop.
2021-03-17 00:47:27 +03:00
Stefan Weil 6609ce9510 Fix some typos (most found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-02-24 13:59:11 +01:00
s3rj1k 91f12b5920
[Unit-tests] Fix previously defined AM_* in tests. 2021-02-23 20:59:26 +03:00
willie zhang 62970aa998
[Core] fix asr resample out data len 2020-12-23 21:45:26 +04:00
Andrey Volk 940d82ef9b [Build-System] Fix build with MSBuild. 2020-12-23 00:11:37 +04:00
Andrey Volk 913551315b [Core] switch_core_port_allocator: Replace getaddrinfo() (may get stuck) with switch_sockaddr_new() and fix IPv6. 2020-12-17 21:15:14 +04:00
windy-wang 1d2a1057f8
[Core] Fix the null char in truncated value returned by switch_b64_decode 2020-09-01 21:04:49 +04:00
Andrey Volk 1cea3da2fc [Tests] Fix Drone CI capturing Address Sanitizer reports sent to stderr. 2020-06-24 21:23:53 +04:00
Andrey Volk 0275ea1eb4 [Build-System] Use $(DefaultPlatformToolset) so it's easier to build using newer Microsoft Visual Studio versions. 2020-05-25 14:18:25 +04:00
Andrey Volk 6299fc12be [Build-System] Fix folder conflict when building unit-tests on Windows. 2020-05-24 15:37:31 +04:00
Andrey Volk 0072806df1 [mod_loopback] Split null_auto_answer into two variables null_enable_auto_answer and null_auto_answer_delay. Default auto_answer_delay is 0 instead of 1 ms. Auto answer is enabled by default if null_enable_auto_answer is not set. More carefully compute the delay in ms to not block channel longer than needed. 2020-05-08 01:22:48 +04:00
Seven Du 0cafcf8a9b [core] Add global/leg variable to originate: group_confirm_timeout
group_confirm_timeout is a value in seconds for the maximum time to wait for group confirmation to finish.  This variable replaces group_confirm_cancel_timeout which has been deprecated.  Set group_confirm_timeout=0 to disable leg_timeout during group confirm.
2020-05-08 01:17:22 +04:00
Seven Du 2a54e08019 [core, mod_loopback] Add test case for group confirm over loopback endpoints 2020-05-08 01:12:17 +04:00
Seven Du fcda4c6a06 [core] add support to set group confirm on each leg 2020-05-08 01:11:44 +04:00
Andrey Volk 8778cda16d [Core] Wait sql threads to spin up. Fixes module_exists, show_codec commands. 2020-05-07 02:26:22 +04:00
Chris Rienzo 8e0c0df5b6 [core] Fix switch_vad_process() to properly use result of fvad_process(). Fixes #18 2020-03-05 21:16:33 +04:00
Dragos Oancea 93dcd6e77e [unit-tests] scan-build: Result of 'malloc' is converted to a pointer of type 'char', which is incompatible with sizeof operand type 'int16_t' 2020-02-21 20:28:41 +00:00
Dragos Oancea c1b66f650f [core] add audio channels limit when opening files, configurable through switch.conf.xml (param "max-audio-channels"), add unit-test. 2020-01-27 23:35:19 +00:00
Andrey Volk 893a3cdc1f [Unit-test] Run tests in parallel 2020-01-23 02:29:57 +04:00
Andrey Volk 6d31e846a8 [Unit-tests] Implement module tests in Drone CI 2020-01-21 22:23:30 +04:00
Dragos Oancea c2e80ea1e3 [core] avoid overflow when channel muxing 2020-01-18 00:58:57 +04:00
Dragos Oancea 4bef44b7b0 [unit-tests] fix build switch_rtp on MacOS 2020-01-13 18:23:58 +00:00
Dragos Oancea 664563ca9f [unit-tests] add RTP test with session 2020-01-09 12:38:38 +04:00
Andrey Volk 44ba7eb753 [Unit-tests] Do not initiate sqldb by default unless requested. 2020-01-07 21:17:52 +04:00
Andrey Volk 21229ad18f
Merge pull request #194 from signalwire/coredump
[Unit-tests] Collect crash data when a unit-test core-dumps
2020-01-06 22:49:21 +04:00
Andrey Volk 9762569bfa [Unit-tests] Collect crash data when a unit-test core-dumps 2019-12-31 20:11:43 +04:00
Andrey Volk cdaebdce9d [Unit-tests] Fix switch_xml leak and build. 2019-12-31 04:15:01 +04:00
Andrey Volk 6452fff8df [Unit-tests] Fix switch_xml test crash 2019-12-31 03:06:21 +04:00
Seven Du 79079942de [core] add option to toggle ampersand entities on/off when serialize xml string 2019-12-31 03:03:41 +04:00
Seven Du 917d850b04 [core] remember if a tag is parsed from CDATA 2019-12-31 03:03:04 +04:00
Andrey Volk 1486e84aa2 [Core] Fix dereference of null pointer in switch_ivr_originate and switch_ivr_enterprise_originate causing crashes, add unit test. 2019-12-31 02:31:26 +04:00
Seven Du bafe238b72 [core] fix copy and paste error 2019-12-31 01:00:03 +04:00
Andrey Volk 4eca43bc62 FS-12048: [Core] Fix leak in SQLite (switch_cache_db_execute_sql2str) when queries return a NULL containing field which may result in high memory consumption. 2019-12-31 00:01:23 +04:00
Dragos Oancea be37eea412 [unit-tests] add basic RTP unit-test 2019-12-20 00:04:06 +04:00
Andrey Volk bae7c3eae0 [Unit-tests] Fix switch_core_file test. 2019-12-05 23:44:33 +04:00
Dragos Oancea b124b607d7 [Core] Add PRE_CLOSED flag on file handle, add unit test. 2019-12-05 21:55:46 +04:00
Andrey Volk b337e77258 [Unit-tests] Fix leaks in mod_test and in switch_core_codec, switch_vpx, switch_xml, switch_ivr_play_say tests. 2019-11-27 21:38:19 +04:00
Andrey Volk 2865603ad2 [Unit-tests] Fix xml error not finding freeswitch.xml on FST_MINCORE_BEGIN 2019-11-26 01:54:43 +04:00
Andrey Volk 0bd676db32 Add unit-tests automation to Drone CI 2019-11-22 00:15:40 +04:00
Seven Du 724868fa08 [core] fix test case 2019-11-21 22:06:14 +04:00
Dragos Oancea 797216fcc0 FS-12008: special case G722 - fix rate passed to switch_core_codec_init() 2019-08-19 18:31:10 +00:00
Dragos Oancea 6fb0396076 FS-11967: add mod_opus to unit test XML 2019-08-01 15:42:08 +00:00
Dragos Oancea d57cd80428 FS-11967: add unit test for switch_core_codec_copy() 2019-08-01 15:41:43 +00:00
Seven Du 6667d6213b FS-11425 update test vpx config to new defaults 2019-07-26 00:50:11 +04:00
Seven Du 116ee36d3d FS-11425 add vpx conf to test code 2019-07-26 00:50:08 +04:00
Andrey Volk b6b61539a1 FS-11895: [build] fix test build 2019-07-26 00:49:14 +04:00
Andrey Volk 9c8de649b3 FS-11947: [Build-System] Do not install test binaries when doing make install. 2019-07-23 19:34:21 +04:00
Anthony Minessale 9cb6b201a6 FS-11921: [core] add switch_img_data_url_png 2019-07-18 00:50:48 +04:00
Chris Rienzo fb695c528e FS-11893 [core] add switch_dial_handle_create_json() and switch_dial_handle_serialize_json() for dial handle/json conversions 2019-07-18 00:09:20 +04:00
Chris Rienzo c796723dd7 FS-11728 [core] add switch_ivr_play_and_collect_input(). This function plays a prompt while looking for DTMF or speech and returns whatever was heard. 2019-07-17 19:58:45 +04:00
Seven Du 17ec25d635 FS-11425 update vpx test code to suuport verbose logging 2019-07-17 01:08:44 +04:00
Andrey Volk 2cfd0e3c2b FS-11425 add vpx conf to test code 2019-07-17 01:08:25 +04:00
Seven Du 8e43604dbd FS-11425 add vpx test code 2019-07-17 01:01:21 +04:00
Konstantin Molchanov 69f3dfe779 FS-11892 [switch_console] fix stream write_function 2019-06-18 12:47:39 +03:00
Seven Du d76cac15fc FS-11615 fix compiler warning 2019-01-17 15:38:13 +08:00
Andrey Volk 97f42d429f FS-11505: [core] System call with output capture on Linux and Windows without fork. Add switch_core test. 2018-12-20 10:19:27 -05:00
Seven Du 18940d13f1 FS-11455 add switch_utils test 2018-12-20 10:19:20 -05:00
Seven Du 879a4dc7ec FS-11487 #resolve convert to Makefile.am
fix regression from 53533118cd7eedf7d25a9c6227558736fa5d0b2f
2018-12-20 10:18:54 -05:00
Chris Rienzo 0c8f5ed60d FS-11453 [core] remove dependency to libtap for unit tests
move all core unit tests to tests/unit
2018-12-20 10:18:28 -05:00
William King a5a3561b2b FS-8233 Clean up formatting 2015-10-09 11:10:32 -07:00
William King 7724270d89 FS-8233 convert unit tests frameworks to non-recursive makefiles 2015-10-08 13:01:04 -07:00
William King 4845587be9 FS-7820 using a more appropriate function for printing diags 2015-10-07 10:35:46 -07:00
Michael Jerris 81ba61930f fix automake warnings on tests/unit/Makefile.am 2015-07-20 11:58:40 -04:00
William King 7ee97d6591 FS-7820 fix build system typo. Don't assign the same variable twice. 2015-07-14 12:34:05 -07:00
William King a54e04df00 FS-7820 updated switch_event.c to have benchmark framework, and updated .gitignore file to ignore binary test files 2015-07-10 15:31:11 -07:00
William King d5904f4a96 FS-7820 adding a unit test for switch_hash.c with benchmarking example
and docs
2015-07-10 15:09:24 -07:00
William King 8cb75a6000 FS-7820 rename test file to better track the core functionality it will test 2015-07-10 15:08:58 -07:00
William King 818d1b24bf FS-7820 Fix build if you don't have libtap installed 2015-07-10 12:22:32 -07:00
William King f7f5c7587f FS-7820
C level unit testing and micro benchmarking framework, including one
example unit test.
2015-07-10 12:04:04 -07:00