forked from Mirrors/freeswitch
[Unit-tests] Place module tests into their module's Makefile.am, fix tests, add missing Makefile.am to mod_png, implement recursive make check.
This commit is contained in:
parent
5e83ef7e7b
commit
751d5ff55b
|
@ -548,6 +548,7 @@ src/mod/modules.inc: $(switch_builddir)/modules.conf
|
|||
@echo "OUR_MODULES=$(OUR_MODS)" > $(switch_builddir)/src/mod/modules.inc
|
||||
@echo "OUR_CLEAN_MODULES=$(OUR_CLEAN_MODS)" >> $(switch_builddir)/src/mod/modules.inc
|
||||
@echo "OUR_TEST_MODULES=$(OUR_TEST_MODS)" >> $(switch_builddir)/src/mod/modules.inc
|
||||
@echo "OUR_CHECK_MODULES=$(OUR_CHECK_MODS)" >> $(switch_builddir)/src/mod/modules.inc
|
||||
@echo "OUR_INSTALL_MODULES=$(OUR_INSTALL_MODS)" >> $(switch_builddir)/src/mod/modules.inc
|
||||
@echo "OUR_UNINSTALL_MODULES=$(OUR_UNINSTALL_MODS)" >> $(switch_builddir)/src/mod/modules.inc
|
||||
@echo "OUR_DISABLED_MODULES=$(OUR_DISABLED_MODS)" >> $(switch_builddir)/src/mod/modules.inc
|
||||
|
|
|
@ -1877,7 +1877,6 @@ AC_CONFIG_FILES([Makefile
|
|||
src/mod/applications/mod_hiredis/Makefile
|
||||
src/mod/applications/mod_httapi/Makefile
|
||||
src/mod/applications/mod_http_cache/Makefile
|
||||
src/mod/applications/mod_http_cache/test/Makefile
|
||||
src/mod/applications/mod_ladspa/Makefile
|
||||
src/mod/applications/mod_lcr/Makefile
|
||||
src/mod/applications/mod_limit/Makefile
|
||||
|
@ -1905,7 +1904,6 @@ AC_CONFIG_FILES([Makefile
|
|||
src/mod/applications/mod_spy/Makefile
|
||||
src/mod/applications/mod_stress/Makefile
|
||||
src/mod/applications/mod_test/Makefile
|
||||
src/mod/applications/mod_test/test/Makefile
|
||||
src/mod/applications/mod_translate/Makefile
|
||||
src/mod/applications/mod_valet_parking/Makefile
|
||||
src/mod/applications/mod_vmd/Makefile
|
||||
|
@ -1974,7 +1972,6 @@ AC_CONFIG_FILES([Makefile
|
|||
src/mod/event_handlers/mod_radius_cdr/Makefile
|
||||
src/mod/event_handlers/mod_odbc_cdr/Makefile
|
||||
src/mod/event_handlers/mod_rayo/Makefile
|
||||
src/mod/event_handlers/mod_rayo/test/Makefile
|
||||
src/mod/event_handlers/mod_smpp/Makefile
|
||||
src/mod/event_handlers/mod_snmp/Makefile
|
||||
src/mod/event_handlers/mod_event_zmq/Makefile
|
||||
|
@ -1982,6 +1979,7 @@ AC_CONFIG_FILES([Makefile
|
|||
src/mod/formats/mod_local_stream/Makefile
|
||||
src/mod/formats/mod_native_file/Makefile
|
||||
src/mod/formats/mod_opusfile/Makefile
|
||||
src/mod/formats/mod_png/Makefile
|
||||
src/mod/formats/mod_shell_stream/Makefile
|
||||
src/mod/formats/mod_shout/Makefile
|
||||
src/mod/formats/mod_sndfile/Makefile
|
||||
|
@ -1991,7 +1989,6 @@ AC_CONFIG_FILES([Makefile
|
|||
src/mod/formats/mod_portaudio_stream/Makefile
|
||||
src/mod/languages/mod_java/Makefile
|
||||
src/mod/languages/mod_lua/Makefile
|
||||
src/mod/languages/mod_lua/test/Makefile
|
||||
src/mod/languages/mod_managed/Makefile
|
||||
src/mod/languages/mod_perl/Makefile
|
||||
src/mod/languages/mod_python/Makefile
|
||||
|
@ -2066,6 +2063,7 @@ OUR_CLEAN_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; el
|
|||
OUR_INSTALL_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-install ; done)"; echo $$mods )'
|
||||
OUR_UNINSTALL_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-uninstall ; done)"; echo $$mods )'
|
||||
OUR_TEST_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-print_tests ; done )"; echo $$mods )'
|
||||
OUR_CHECK_MODS='$$(if test -z "$(MODULES)" ; then tmp_mods="$(CONF_MODULES)"; else tmp_mods="$(MODULES)" ; fi ; mods="$$(for i in $$tmp_mods ; do echo $$i-check ; done )"; echo $$mods )'
|
||||
OUR_DISABLED_MODS='$$(tmp_mods="$(CONF_DISABLED_MODULES)"; mods="$$(for i in $$tmp_mods ; do echo $$i-all ; done )"; echo $$mods )'
|
||||
OUR_DISABLED_CLEAN_MODS='$$(tmp_mods="$(CONF_DISABLED_MODULES)"; mods="$$(for i in $$tmp_mods ; do echo $$i-clean ; done )"; echo $$mods )'
|
||||
OUR_DISABLED_INSTALL_MODS='$$(tmp_mods="$(CONF_DISABLED_MODULES)"; mods="$$(for i in $$tmp_mods ; do echo $$i-install ; done)"; echo $$mods )'
|
||||
|
@ -2081,6 +2079,7 @@ AC_SUBST(CONF_MODULES)
|
|||
AC_SUBST(OUR_MODS)
|
||||
AC_SUBST(OUR_CLEAN_MODS)
|
||||
AC_SUBST(OUR_TEST_MODS)
|
||||
AC_SUBST(OUR_CHECK_MODS)
|
||||
AC_SUBST(OUR_INSTALL_MODS)
|
||||
AC_SUBST(OUR_UNINSTALL_MODS)
|
||||
AC_SUBST(OUR_DISABLED_MODS)
|
||||
|
|
|
@ -76,6 +76,12 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
|
|||
//SWITCH_GLOBAL_dirs.lib_dir = strdup("/usr/local/freeswitch/lib");
|
||||
//SWITCH_GLOBAL_dirs.temp_dir = strdup("/tmp");
|
||||
|
||||
#ifdef SWITCH_TEST_BASE_DIR_OVERRIDE
|
||||
basedir = SWITCH_TEST_BASE_DIR_OVERRIDE;
|
||||
#else
|
||||
#define SWITCH_TEST_BASE_DIR_OVERRIDE "."
|
||||
#endif
|
||||
|
||||
if (zstr(basedir)) {
|
||||
basedir = ".";
|
||||
}
|
||||
|
@ -350,7 +356,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
|
|||
const char *fst_test_module = #modname; \
|
||||
if (fst_core && !zstr(fst_test_module)) { \
|
||||
const char *err; \
|
||||
switch_loadable_module_load_module((char *)"../.libs", (char *)fst_test_module, SWITCH_TRUE, &err); \
|
||||
char path[1024]; \
|
||||
sprintf(path, "%s%s%s", SWITCH_TEST_BASE_DIR_OVERRIDE, SWITCH_PATH_SEPARATOR, "../.libs/"); \
|
||||
switch_loadable_module_load_module((char *)path, (char *)fst_test_module, SWITCH_TRUE, &err); \
|
||||
} \
|
||||
FCT_FIXTURE_SUITE_BGN(suite);
|
||||
#endif
|
||||
|
@ -371,7 +379,9 @@ static switch_status_t fst_init_core_and_modload(const char *confdir, const char
|
|||
FCT_FIXTURE_SUITE_END(); \
|
||||
if (!zstr(fst_test_module) && switch_loadable_module_exists(fst_test_module) == SWITCH_STATUS_SUCCESS) { \
|
||||
const char *err; \
|
||||
switch_loadable_module_unload_module((char *)"../.libs", (char *)fst_test_module, SWITCH_FALSE, &err); \
|
||||
char path[1024]; \
|
||||
sprintf(path, "%s%s%s", SWITCH_TEST_BASE_DIR_OVERRIDE, SWITCH_PATH_SEPARATOR, "../.libs/"); \
|
||||
switch_loadable_module_unload_module((char*)path, (char *)fst_test_module, SWITCH_FALSE, &err); \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@ clean: $(OUR_CLEAN_MODULES) $(OUR_DISABLED_CLEAN_MODULES)
|
|||
install: $(OUR_INSTALL_MODULES)
|
||||
uninstall: $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES)
|
||||
print_tests: $(OUR_TEST_MODULES)
|
||||
check: $(OUR_CHECK_MODULES)
|
||||
|
||||
mod_skypopen-all: mod_gsmopen-all
|
||||
mod_gsmopen-all: mod_spandsp-all
|
||||
|
@ -12,7 +13,7 @@ mod_unimrcp-all: mod_sofia-all
|
|||
mod_rayo-all: mod_dingaling-all
|
||||
mod_ssml-all: mod_rayo-all
|
||||
|
||||
$(OUR_MODULES) $(OUR_CLEAN_MODULES) $(OUR_INSTALL_MODULES) $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_MODULES) $(OUR_DISABLED_CLEAN_MODULES) $(OUR_DISABLED_INSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES) $(OUR_TEST_MODULES):
|
||||
$(OUR_MODULES) $(OUR_CLEAN_MODULES) $(OUR_INSTALL_MODULES) $(OUR_UNINSTALL_MODULES) $(OUR_DISABLED_MODULES) $(OUR_DISABLED_CLEAN_MODULES) $(OUR_DISABLED_INSTALL_MODULES) $(OUR_DISABLED_UNINSTALL_MODULES) $(OUR_TEST_MODULES) $(OUR_CHECK_MODULES):
|
||||
@set fnord $$MAKEFLAGS; amf=$$2; \
|
||||
target=`echo $@ | sed -e 's|^.*-||'`; \
|
||||
modname=`echo $@ | sed -e 's|-.*||' | sed -e 's|^.*/||'`; \
|
||||
|
|
|
@ -23,13 +23,15 @@ mod_av_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lm -lz
|
|||
|
||||
|
||||
noinst_PROGRAMS = test/test_mod_av test/test_avformat
|
||||
AM_CFLAGS = $(SWITCH_AM_CFLAGS) -I../ $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(RESAMPLE_CFLAGS)
|
||||
AM_LDFLAGS = $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(RESAMPLE_LIBS) -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS)
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
||||
test_test_mod_av_CFLAGS = $(SWITCH_AM_CFLAGS) -I../ -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\" $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(RESAMPLE_CFLAGS)
|
||||
test_test_mod_av_LDFLAGS = $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(RESAMPLE_LIBS) -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS)
|
||||
test_test_mod_av_LDADD = libavmod.la $(switch_builddir)/libfreeswitch.la
|
||||
test_test_avformat_CFLAGS = $(SWITCH_AM_CFLAGS) -I../ -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\" $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(RESAMPLE_CFLAGS)
|
||||
test_test_avformat_LDFLAGS = $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(RESAMPLE_LIBS) -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS)
|
||||
test_test_avformat_LDADD = libavmod.la $(switch_builddir)/libfreeswitch.la
|
||||
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
||||
else
|
||||
install: error
|
||||
all: error
|
||||
|
|
|
@ -44,6 +44,7 @@ FST_CORE_BEGIN("conf")
|
|||
|
||||
FST_TEST_BEGIN(avformat_test_colorspace_RGB)
|
||||
{
|
||||
char path[1024];
|
||||
switch_status_t status;
|
||||
switch_image_t *img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 1280, 720, 1);
|
||||
switch_file_handle_t fh = { 0 };
|
||||
|
@ -57,7 +58,8 @@ FST_CORE_BEGIN("conf")
|
|||
|
||||
fst_requires(img);
|
||||
|
||||
status = switch_core_file_open(&fh, "{colorspace=0}./test_RGB.mp4", 1, 8000, flags, fst_pool);
|
||||
sprintf(path, "%s%s%s%s", "{colorspace=0}", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../test_RGB.mp4");
|
||||
status = switch_core_file_open(&fh, path, 1, 8000, flags, fst_pool);
|
||||
fst_requires(status == SWITCH_STATUS_SUCCESS);
|
||||
fst_requires(switch_test_flag(&fh, SWITCH_FILE_OPEN));
|
||||
|
||||
|
@ -70,7 +72,8 @@ FST_CORE_BEGIN("conf")
|
|||
status = switch_core_file_write_video(&fh, &frame);
|
||||
fst_check(status == SWITCH_STATUS_SUCCESS);
|
||||
|
||||
ccimg = switch_img_read_png("./cluecon.png", SWITCH_IMG_FMT_ARGB);
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../cluecon.png");
|
||||
ccimg = switch_img_read_png(path, SWITCH_IMG_FMT_ARGB);
|
||||
fst_requires(ccimg);
|
||||
|
||||
color.a = 255;
|
||||
|
@ -101,6 +104,7 @@ FST_CORE_BEGIN("conf")
|
|||
|
||||
FST_TEST_BEGIN(avformat_test_colorspace_BT7)
|
||||
{
|
||||
char path[1024];
|
||||
switch_status_t status;
|
||||
switch_image_t *img = switch_img_alloc(NULL, SWITCH_IMG_FMT_I420, 1280, 720, 1);
|
||||
switch_file_handle_t fh = { 0 };
|
||||
|
@ -114,7 +118,8 @@ FST_CORE_BEGIN("conf")
|
|||
|
||||
fst_requires(img);
|
||||
|
||||
status = switch_core_file_open(&fh, "{colorspace=1}./test_BT7.mp4", 1, 8000, flags, fst_pool);
|
||||
sprintf(path, "%s%s%s%s", "{colorspace=1}", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../test_BT7.mp4");
|
||||
status = switch_core_file_open(&fh, path, 1, 8000, flags, fst_pool);
|
||||
fst_requires(status == SWITCH_STATUS_SUCCESS);
|
||||
fst_requires(switch_test_flag(&fh, SWITCH_FILE_OPEN));
|
||||
|
||||
|
@ -127,7 +132,8 @@ FST_CORE_BEGIN("conf")
|
|||
status = switch_core_file_write_video(&fh, &frame);
|
||||
fst_check(status == SWITCH_STATUS_SUCCESS);
|
||||
|
||||
ccimg = switch_img_read_png("./cluecon.png", SWITCH_IMG_FMT_ARGB);
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../cluecon.png");
|
||||
ccimg = switch_img_read_png(path, SWITCH_IMG_FMT_ARGB);
|
||||
fst_requires(ccimg);
|
||||
|
||||
color.a = 255;
|
||||
|
|
|
@ -24,12 +24,12 @@ libmodconference_la_CFLAGS = $(AM_CFLAGS) -I.
|
|||
noinst_PROGRAMS = test/test_image test/test_member
|
||||
|
||||
test_test_image_SOURCES = test/test_image.c
|
||||
test_test_image_CFLAGS = $(AM_CFLAGS) -I.
|
||||
test_test_image_CFLAGS = $(AM_CFLAGS) -I. -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_image_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_image_LDADD = libmodconference.la
|
||||
|
||||
test_test_member_SOURCES = test/test_member.c
|
||||
test_test_member_CFLAGS = $(AM_CFLAGS) -I.
|
||||
test_test_member_CFLAGS = $(AM_CFLAGS) -I. -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_member_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_member_LDADD = libmodconference.la
|
||||
|
||||
|
|
|
@ -50,32 +50,39 @@ FST_CORE_BEGIN("./conf")
|
|||
|
||||
FST_TEST_BEGIN(scale_test)
|
||||
{
|
||||
switch_image_t *img = switch_img_read_png("images/signalwire.png", SWITCH_IMG_FMT_I420);
|
||||
char path[4096];
|
||||
switch_image_t *img;
|
||||
int i;
|
||||
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../images/signalwire.png");
|
||||
img = switch_img_read_png(path, SWITCH_IMG_FMT_I420);
|
||||
|
||||
for(i = 2; i <= 10; i += 2) {
|
||||
switch_image_t *scaled_img = NULL;
|
||||
char name[1024];
|
||||
|
||||
switch_snprintf(name, sizeof(name), "images/signalwire-scaled-I420-%d.png", i);
|
||||
switch_snprintf(name, sizeof(name), "../images/signalwire-scaled-I420-%d.png", i);
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, name);
|
||||
switch_img_scale(img, &scaled_img, img->d_w / i, img->d_h / i);
|
||||
fst_requires(scaled_img);
|
||||
switch_img_write_png(scaled_img, name);
|
||||
switch_img_write_png(scaled_img, path);
|
||||
switch_img_free(&scaled_img);
|
||||
}
|
||||
|
||||
switch_img_free(&img);
|
||||
|
||||
img = switch_img_read_png("images/signalwire.png", SWITCH_IMG_FMT_ARGB);
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../images/signalwire.png");
|
||||
img = switch_img_read_png(path, SWITCH_IMG_FMT_ARGB);
|
||||
|
||||
for(i = 2; i <= 10; i += 2) {
|
||||
switch_image_t *scaled_img = NULL;
|
||||
char name[1024];
|
||||
|
||||
switch_snprintf(name, sizeof(name), "images/signalwire-scaled-ARGB-%d.png", i);
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, name);
|
||||
switch_img_scale(img, &scaled_img, img->d_w / i, img->d_h / i);
|
||||
fst_requires(scaled_img);
|
||||
switch_img_write_png(scaled_img, name);
|
||||
switch_img_write_png(scaled_img, path);
|
||||
switch_img_free(&scaled_img);
|
||||
}
|
||||
|
||||
|
@ -86,7 +93,8 @@ FST_CORE_BEGIN("./conf")
|
|||
|
||||
FST_TEST_BEGIN(scale_test)
|
||||
{
|
||||
switch_image_t *img = switch_img_read_png("images/signalwire-scaled-ARGB-8.png", SWITCH_IMG_FMT_ARGB);
|
||||
char path[1024];
|
||||
switch_image_t *img;
|
||||
char *font_face = "font/AEH.ttf";
|
||||
char *fg = "#000000";
|
||||
char *altfg = "#FFFFFF";
|
||||
|
@ -96,10 +104,14 @@ FST_CORE_BEGIN("./conf")
|
|||
const char *txt = "FEESWITCH ROCKS";
|
||||
const char *alttxt = "freeswitch";
|
||||
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../images/signalwire-scaled-ARGB-8.png");
|
||||
img = switch_img_read_png(path, SWITCH_IMG_FMT_ARGB);
|
||||
|
||||
switch_img_txt_handle_create(&txthandle, font_face, fg, bg, font_size, 0, NULL);
|
||||
switch_img_txt_handle_render(txthandle, img, 50, 3, txt, NULL, fg, bg, font_size, 0);
|
||||
switch_img_txt_handle_render(txthandle, img, 60, 15, alttxt, NULL, altfg, "#000000", font_size, 0);
|
||||
switch_img_write_png(img, "images/signalwire-scaled-ARGB-8-txt.png");
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../images/signalwire-scaled-ARGB-8-txt.png");
|
||||
switch_img_write_png(img, path);
|
||||
|
||||
switch_img_free(&img);
|
||||
}
|
||||
|
|
|
@ -52,16 +52,18 @@ FST_CORE_BEGIN("./conf")
|
|||
|
||||
FST_TEST_BEGIN(member_test)
|
||||
{
|
||||
char path[4096];
|
||||
const char *logo = "{position=left-bot,text_x=center,"
|
||||
"center_offset=190,text=#000000:transparent:font/AEH.ttf:50:"
|
||||
"'FREESWITCH ROCKS',alt_text_x=center,alt_center_offset=190,"
|
||||
"alt_text_y=88,alt_text=#ffffff:transparent:font/AEH.ttf:40:"
|
||||
"'freeswitch'}images/signalwire.png";
|
||||
"'freeswitch'}";
|
||||
conference_member_t smember = { 0 };
|
||||
conference_member_t *member = &smember;
|
||||
switch_image_t *img;
|
||||
int i;
|
||||
|
||||
sprintf(path, "%s%s%s%s", logo, SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "../images/signalwire.png");
|
||||
switch_mutex_init(&member->write_mutex, SWITCH_MUTEX_NESTED, fst_pool);
|
||||
switch_mutex_init(&member->flag_mutex, SWITCH_MUTEX_NESTED, fst_pool);
|
||||
switch_mutex_init(&member->fnode_mutex, SWITCH_MUTEX_NESTED, fst_pool);
|
||||
|
@ -70,17 +72,18 @@ FST_CORE_BEGIN("./conf")
|
|||
switch_mutex_init(&member->read_mutex, SWITCH_MUTEX_NESTED, fst_pool);
|
||||
switch_thread_rwlock_create(&member->rwlock, fst_pool);
|
||||
|
||||
conference_member_set_logo(member, logo);
|
||||
conference_member_set_logo(member, path);
|
||||
img = member->video_logo;
|
||||
|
||||
for(i = 2; i <= 10; i += 2) {
|
||||
switch_image_t *scaled_img = NULL;
|
||||
char name[1024];
|
||||
|
||||
switch_snprintf(name, sizeof(name), "images/logo-signalwire-scaled-%d.png", i);
|
||||
switch_snprintf(name, sizeof(name), "../images/logo-signalwire-scaled-%d.png", i);
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, name);
|
||||
switch_img_scale(img, &scaled_img, img->d_w / i, img->d_h / i);
|
||||
fst_requires(scaled_img);
|
||||
switch_img_write_png(scaled_img, name);
|
||||
switch_img_write_png(scaled_img, path);
|
||||
switch_img_free(&scaled_img);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,22 @@
|
|||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_http_cache
|
||||
|
||||
noinst_LTLIBRARIES = libhttpcachemod.la
|
||||
libhttpcachemod_la_SOURCES = mod_http_cache.c common.c aws.c azure.c
|
||||
|
||||
mod_LTLIBRARIES = mod_http_cache.la
|
||||
mod_http_cache_la_SOURCES = mod_http_cache.c common.c aws.c azure.c
|
||||
mod_http_cache_la_SOURCES =
|
||||
mod_http_cache_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_http_cache_la_CPPFLAGS = $(CURL_CFLAGS) $(AM_CPPFLAGS)
|
||||
mod_http_cache_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_http_cache_la_LIBADD = $(switch_builddir)/libfreeswitch.la libhttpcachemod.la
|
||||
mod_http_cache_la_LDFLAGS = $(CURL_LIBS) -avoid-version -module -no-undefined -shared
|
||||
|
||||
SUBDIRS=. test
|
||||
noinst_PROGRAMS = test/test_aws
|
||||
|
||||
test_test_aws_SOURCES = test/test_aws.c
|
||||
test_test_aws_CFLAGS = $(AM_CFLAGS) -I. -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_aws_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_aws_LDADD = libhttpcachemod.la
|
||||
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
noinst_PROGRAMS = test_aws
|
||||
AM_CFLAGS = $(SWITCH_AM_CFLAGS)
|
||||
AM_LDFLAGS = $(switch_builddir)/libfreeswitch.la -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS) ../mod_http_cache.la
|
||||
TESTS = $(noinst_PROGRAMS)
|
|
@ -10,5 +10,12 @@ mod_test_la_SOURCES =
|
|||
mod_test_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(SOFIALA) libtestmod.la
|
||||
mod_test_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
SUBDIRS=. test
|
||||
noinst_PROGRAMS = test/test_asr
|
||||
|
||||
test_test_asr_SOURCES = test/test_asr.c
|
||||
test_test_asr_CFLAGS = $(AM_CFLAGS) -I. -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_asr_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_asr_LDADD = libtestmod.la
|
||||
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
include $(top_srcdir)/build/modmake.rulesam
|
||||
noinst_PROGRAMS = test_asr
|
||||
test_asr_CFLAGS = $(AM_CFLAGS) -I../
|
||||
test_asr_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_asr_LDADD = ../libtestmod.la
|
||||
TESTS = $(noinst_PROGRAMS)
|
|
@ -73,12 +73,14 @@ FST_TEARDOWN_END()
|
|||
|
||||
FST_TEST_BEGIN(core_asr)
|
||||
{
|
||||
char path[1024];
|
||||
const char* session_id = "123435";
|
||||
char *grammar = switch_core_sprintf(fst_pool, "{start-input-timers=true,no-input-timeout=5000,speech-timeout=10000,channel-uuid=%s}default", session_id);
|
||||
fst_test_core_asr_open("test");
|
||||
sprintf(path, "%s%s%s%s", "file_string://silence_stream://3000,0!", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://silence_stream://3000,0!sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_resume();
|
||||
fst_test_core_asr(
|
||||
|
@ -86,9 +88,10 @@ FST_TEST_BEGIN(core_asr)
|
|||
"silence_stream://30000,0");
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "no_input");
|
||||
fst_test_core_asr_resume();
|
||||
sprintf(path, "%s%s%s%s", "file_string://", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_resume();
|
||||
fst_test_core_asr(
|
||||
|
@ -96,22 +99,24 @@ FST_TEST_BEGIN(core_asr)
|
|||
"silence_stream://30000,0");
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "no_input");
|
||||
fst_test_core_asr_resume();
|
||||
sprintf(path, "%s%s%s%s", "file_string://", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_pause();
|
||||
fst_test_core_asr_resume();
|
||||
sprintf(path, "%s%s%s%s", "file_string://", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_close();
|
||||
|
||||
fst_test_core_asr_open("test");
|
||||
sprintf(path, "%s%s%s%s", "file_string://silence_stream://1000,0!", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://silence_stream://1000,0!sounds/ivr-please_state_your_name_and_reason_for_calling.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_close();
|
||||
}
|
||||
|
@ -119,35 +124,40 @@ FST_TEST_END()
|
|||
|
||||
FST_TEST_BEGIN(core_asr_auto_resume)
|
||||
{
|
||||
char path[1024];
|
||||
const char* session_id = "123435";
|
||||
char *grammar = switch_core_sprintf(fst_pool, "{start-input-timers=true,no-input-timeout=5000,speech-timeout=10000,channel-uuid=%s}default", session_id);
|
||||
fst_test_core_asr_open("test");
|
||||
switch_set_flag(&ah, SWITCH_ASR_FLAG_AUTO_RESUME);
|
||||
sprintf(path, "%s%s%s%s", "file_string://silence_stream://3000,0!", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://silence_stream://3000,0!sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"silence_stream://30000,0");
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "no_input");
|
||||
sprintf(path, "%s%s%s%s", "file_string://", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"silence_stream://30000,0");
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "no_input");
|
||||
fst_test_core_asr_resume();
|
||||
sprintf(path, "%s%s%s%s", "file_string://", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_resume();
|
||||
sprintf(path, "%s%s%s%s", "file_string://silence_stream://1000,0!", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://silence_stream://1000,0!sounds/ivr-please_state_your_name_and_reason_for_calling.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_close();
|
||||
}
|
||||
|
@ -155,21 +165,24 @@ FST_TEST_END()
|
|||
|
||||
FST_TEST_BEGIN(core_asr_abuse)
|
||||
{
|
||||
char path[1024];
|
||||
const char* session_id = "5351514";
|
||||
char *grammar = switch_core_sprintf(fst_pool, "{start-input-timers=true,no-input-timeout=5000,speech-timeout=10000,channel-uuid=%s}default", session_id);
|
||||
fst_test_core_asr_open("test");
|
||||
sprintf(path, "%s%s%s%s", "file_string://silence_stream://3000,0!", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://silence_stream://3000,0!sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_resume();
|
||||
fst_test_core_asr_resume();
|
||||
fst_test_core_asr_resume();
|
||||
fst_test_core_asr_pause();
|
||||
fst_test_core_asr_resume();
|
||||
sprintf(path, "%s%s%s%s", "file_string://", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav!silence_stream://3000,0");
|
||||
fst_test_core_asr(
|
||||
grammar,
|
||||
"file_string://sounds/agent.wav!silence_stream://3000,0");
|
||||
path);
|
||||
fst_check_string_equals(get_query_result_text(fst_pool, fst_asr_result), "agent");
|
||||
fst_test_core_asr_resume();
|
||||
|
||||
|
@ -181,24 +194,30 @@ FST_TEST_END()
|
|||
|
||||
FST_SESSION_BEGIN(play_and_detect_1)
|
||||
{
|
||||
char path[1024];
|
||||
char path2[1024];
|
||||
const char *result_text = NULL;
|
||||
char *grammar = switch_core_session_sprintf(fst_session, "{start-input-timers=false,no-input-timeout=5000,speech-timeout=10000,channel-uuid=%s}default", switch_core_session_get_uuid(fst_session));
|
||||
fst_play_and_detect_speech_test_begin();
|
||||
|
||||
/* initial welcome and request */
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav");
|
||||
sprintf(path2, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav");
|
||||
fst_play_and_detect_speech_app_test("test",
|
||||
grammar,
|
||||
"sounds/ivr-please_state_your_name_and_reason_for_calling.wav",
|
||||
"sounds/agent.wav");
|
||||
path,
|
||||
path2);
|
||||
result_text = get_query_result_text(fst_pool, fst_asr_result);
|
||||
fst_requires(result_text != NULL);
|
||||
fst_check_string_equals(result_text, "agent");
|
||||
|
||||
/* follow up request */
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav");
|
||||
sprintf(path2, "%s%s%s%s", "file_string://1000,0!", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav");
|
||||
fst_play_and_detect_speech_app_test("test",
|
||||
grammar,
|
||||
"sounds/ivr-please_state_your_name_and_reason_for_calling.wav",
|
||||
"file_string://1000,0!sounds/agent.wav");
|
||||
path,
|
||||
path2);
|
||||
result_text = get_query_result_text(fst_pool, fst_asr_result);
|
||||
fst_requires(result_text != NULL);
|
||||
fst_check_string_equals(result_text, "agent");
|
||||
|
@ -209,23 +228,28 @@ FST_SESSION_END()
|
|||
|
||||
FST_SESSION_BEGIN(play_and_detect_no_input_follow_up)
|
||||
{
|
||||
char path[1024];
|
||||
char path2[1024];
|
||||
const char *result_text = NULL;
|
||||
char *grammar = switch_core_session_sprintf(fst_session, "{start-input-timers=false,no-input-timeout=5000,speech-timeout=10000,channel-uuid=%s}", switch_core_session_get_uuid(fst_session));
|
||||
|
||||
switch_ivr_schedule_hangup(switch_epoch_time_now(NULL) + 60, switch_core_session_get_uuid(fst_session), SWITCH_CAUSE_NORMAL_CLEARING, SWITCH_FALSE);
|
||||
fst_play_and_detect_speech_test_begin();
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav");
|
||||
sprintf(path2, "%s%s%s%s", "file_string://silence_stream://4000,0!", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/agent.wav");
|
||||
fst_play_and_detect_speech_app_test("test",
|
||||
grammar,
|
||||
"sounds/ivr-please_state_your_name_and_reason_for_calling.wav",
|
||||
"file_string://silence_stream://4000,0!sounds/agent.wav");
|
||||
path,
|
||||
path2);
|
||||
result_text = get_query_result_text(fst_pool, fst_asr_result);
|
||||
fst_requires(result_text != NULL);
|
||||
fst_check_string_equals(result_text, "agent");
|
||||
|
||||
/* follow up request - no input */
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav");
|
||||
fst_play_and_detect_speech_app_test("test",
|
||||
grammar,
|
||||
"sounds/ivr-please_state_your_name_and_reason_for_calling.wav",
|
||||
path,
|
||||
"silence_stream://10000,0");
|
||||
result_text = get_query_result_text(fst_pool, fst_asr_result);
|
||||
fst_requires(result_text != NULL);
|
||||
|
@ -237,15 +261,17 @@ FST_SESSION_END()
|
|||
|
||||
FST_SESSION_BEGIN(play_and_detect_no_input)
|
||||
{
|
||||
char path[1024];
|
||||
const char *result_text = NULL;
|
||||
|
||||
switch_ivr_schedule_hangup(switch_epoch_time_now(NULL) + 60, switch_core_session_get_uuid(fst_session), SWITCH_CAUSE_NORMAL_CLEARING, SWITCH_FALSE);
|
||||
fst_play_and_detect_speech_test_begin();
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav");
|
||||
fst_play_and_detect_speech_app_test("test",
|
||||
switch_core_session_sprintf(fst_session,
|
||||
"{start-input-timers=false,no-input-timeout=5000,speech-timeout=10000,channel-uuid=%s}default",
|
||||
switch_core_session_get_uuid(fst_session)),
|
||||
"sounds/ivr-please_state_your_name_and_reason_for_calling.wav",
|
||||
path,
|
||||
"silence_stream://10000,0");
|
||||
result_text = get_query_result_text(fst_pool, fst_asr_result);
|
||||
fst_requires(result_text != NULL);
|
||||
|
@ -257,16 +283,17 @@ FST_SESSION_END()
|
|||
|
||||
FST_SESSION_BEGIN(play_and_detect_start_input_timers)
|
||||
{
|
||||
char path[1024];
|
||||
const char *result_text = NULL;
|
||||
|
||||
switch_ivr_schedule_hangup(switch_epoch_time_now(NULL) + 60, switch_core_session_get_uuid(fst_session), SWITCH_CAUSE_NORMAL_CLEARING, SWITCH_FALSE);
|
||||
fst_play_and_detect_speech_test_begin();
|
||||
|
||||
sprintf(path, "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, "sounds/ivr-please_state_your_name_and_reason_for_calling.wav");
|
||||
fst_play_and_detect_speech_app_test("test",
|
||||
switch_core_session_sprintf(fst_session,
|
||||
"{start-input-timers=true,no-input-timeout=5000,speech-timeout=10000,channel-uuid=%s}default",
|
||||
switch_core_session_get_uuid(fst_session)),
|
||||
"sounds/ivr-please_state_your_name_and_reason_for_calling.wav",
|
||||
path,
|
||||
"silence_stream://10000,0");
|
||||
result_text = get_query_result_text(fst_pool, fst_asr_result);
|
||||
fst_requires(result_text != NULL);
|
||||
|
@ -282,7 +309,7 @@ FST_TEST_BEGIN(unload_test)
|
|||
{
|
||||
const char *err = NULL;
|
||||
switch_sleep(1000000);
|
||||
fst_check(switch_loadable_module_unload_module((char *)"../.libs", (char *)"mod_test", SWITCH_FALSE, &err) == SWITCH_STATUS_SUCCESS);
|
||||
fst_check(switch_loadable_module_unload_module(SWITCH_GLOBAL_dirs.mod_dir, (char *)"mod_test", SWITCH_FALSE, &err) == SWITCH_STATUS_SUCCESS);
|
||||
}
|
||||
FST_TEST_END()
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ BUILT_SOURCES = $(SOFIALA)
|
|||
noinst_PROGRAMS = test/test_sofia_funcs
|
||||
|
||||
test_test_sofia_funcs_SOURCES = test/test_sofia_funcs.c
|
||||
test_test_sofia_funcs_CFLAGS = $(AM_CFLAGS) -I $(libsofiamod_la_CFLAGS)
|
||||
test_test_sofia_funcs_CFLAGS = $(AM_CFLAGS) -I $(libsofiamod_la_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_sofia_funcs_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS) $(SOFIALA)
|
||||
test_test_sofia_funcs_LDADD = libsofiamod.la $(SOFIALA)
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
|
|
@ -5,11 +5,15 @@ IKS_DIR=$(switch_srcdir)/libs/iksemel
|
|||
IKS_BUILDDIR=$(switch_builddir)/libs/iksemel
|
||||
IKS_LA=$(IKS_BUILDDIR)/src/libiksemel.la
|
||||
|
||||
noinst_LTLIBRARIES = librayomod.la
|
||||
librayomod_la_SOURCES = mod_rayo.c iks_helpers.c nlsml.c rayo_components.c rayo_cpa_component.c rayo_cpa_detector.c rayo_elements.c rayo_fax_components.c
|
||||
librayomod_la_SOURCES += rayo_input_component.c rayo_output_component.c rayo_prompt_component.c rayo_record_component.c sasl.c srgs.c xmpp_streams.c rayo_exec_component.c
|
||||
librayomod_la_CFLAGS = $(AM_CFLAGS) -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS)
|
||||
|
||||
mod_LTLIBRARIES = mod_rayo.la
|
||||
mod_rayo_la_SOURCES = mod_rayo.c iks_helpers.c nlsml.c rayo_components.c rayo_cpa_component.c rayo_cpa_detector.c rayo_elements.c rayo_fax_components.c
|
||||
mod_rayo_la_SOURCES += rayo_input_component.c rayo_output_component.c rayo_prompt_component.c rayo_record_component.c sasl.c srgs.c xmpp_streams.c rayo_exec_component.c
|
||||
mod_rayo_la_SOURCES =
|
||||
mod_rayo_la_CFLAGS = $(AM_CFLAGS) -I$(IKS_DIR)/include $(PCRE_CFLAGS)
|
||||
mod_rayo_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(IKS_LA) $(PCRE_LIBS)
|
||||
mod_rayo_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(IKS_LA) $(PCRE_LIBS) librayomod.la
|
||||
mod_rayo_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
||||
|
||||
BUILT_SOURCES=$(IKS_LA)
|
||||
|
@ -18,4 +22,23 @@ $(IKS_LA): $(IKS_BUILDDIR) $(IKS_DIR) $(IKS_DIR)/.update
|
|||
@cd $(IKS_BUILDDIR) && $(MAKE)
|
||||
@$(TOUCH_TARGET)
|
||||
|
||||
SUBDIRS=. test
|
||||
noinst_PROGRAMS = test/test_iks test/test_nlsml test/test_srgs
|
||||
|
||||
test_test_iks_SOURCES = test/test_iks.c
|
||||
test_test_iks_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_iks_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_iks_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS)
|
||||
|
||||
test_test_nlsml_SOURCES = test/test_nlsml.c
|
||||
test_test_nlsml_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_nlsml_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_nlsml_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS)
|
||||
|
||||
test_test_srgs_SOURCES = test/test_srgs.c
|
||||
test_test_srgs_CFLAGS = $(AM_CFLAGS) -I. -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS) -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_srgs_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_srgs_LDADD = librayomod.la $(IKS_LA) $(PCRE_LIBS)
|
||||
|
||||
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
include $(top_srcdir)/build/modmake.rulesam
|
||||
noinst_PROGRAMS = test_iks test_nlsml test_srgs
|
||||
|
||||
test_iks_CFLAGS = $(AM_CFLAGS) -I../ -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS)
|
||||
test_iks_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) ../mod_rayo.la $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
|
||||
test_nlsml_CFLAGS = $(AM_CFLAGS) -I../ -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS)
|
||||
test_nlsml_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) ../mod_rayo.la $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
|
||||
test_srgs_CFLAGS = $(AM_CFLAGS) -I../ -I$(switch_builddir)/libs/iksemel/include $(PCRE_CFLAGS)
|
||||
test_srgs_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) ../mod_rayo.la $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
|
||||
TESTS = $(noinst_PROGRAMS)
|
|
@ -0,0 +1,8 @@
|
|||
include $(top_srcdir)/build/modmake.rulesam
|
||||
MODNAME=mod_png
|
||||
|
||||
mod_LTLIBRARIES = mod_png.la
|
||||
mod_png_la_SOURCES = mod_png.c
|
||||
mod_png_la_CFLAGS = $(AM_CFLAGS)
|
||||
mod_png_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_png_la_LDFLAGS = -avoid-version -module -no-undefined -shared
|
|
@ -4,13 +4,19 @@ include $(top_srcdir)/build/modmake.rulesam
|
|||
MODNAME=mod_lua
|
||||
|
||||
AM_CFLAGS += $(CFLAGS) -D_GNU_SOURCE
|
||||
|
||||
noinst_LTLIBRARIES = libluamod.la
|
||||
libluamod_la_SOURCES = mod_lua.cpp freeswitch_lua.cpp mod_lua_wrap.cpp
|
||||
libluamod_la_CXXFLAGS = $(AM_CPPFLAGS) $(LUA_CFLAGS) $(CPPFLAGS)
|
||||
libluamod_la_CFLAGS = $(AM_CPPFLAGS) $(LUA_CFLAGS) $(CPPFLAGS)
|
||||
|
||||
mod_LTLIBRARIES = mod_lua.la
|
||||
mod_lua_la_SOURCES = mod_lua.cpp freeswitch_lua.cpp mod_lua_wrap.cpp
|
||||
|
||||
mod_lua_la_CXXFLAGS = $(AM_CPPFLAGS) $(LUA_CFLAGS) $(CPPFLAGS)
|
||||
mod_lua_la_CFLAGS = $(AM_CPPFLAGS) $(LUA_CFLAGS) $(CPPFLAGS)
|
||||
|
||||
mod_lua_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_lua_la_LIBADD = $(switch_builddir)/libfreeswitch.la
|
||||
mod_lua_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lm $(AM_LDFLAGS) $(SOLINK) $(LUA_LIBS)
|
||||
|
||||
reswig: swigclean mod_lua_wrap.cpp
|
||||
|
@ -23,4 +29,12 @@ mod_lua_wrap.cpp: mod_lua_extra.c
|
|||
echo "#include \"mod_lua_extra.c\"" >> mod_lua_wrap.cpp
|
||||
patch -s -p0 -i hack.diff
|
||||
|
||||
SUBDIRS=. test
|
||||
noinst_PROGRAMS = test/test_mod_lua
|
||||
|
||||
test_test_mod_lua_SOURCES = test/test_mod_lua.c
|
||||
test_test_mod_lua_CFLAGS = $(AM_CFLAGS) -I. -DSWITCH_TEST_BASE_DIR_FOR_CONF=\"${abs_builddir}/test\" -DSWITCH_TEST_BASE_DIR_OVERRIDE=\"${abs_builddir}/test\"
|
||||
test_test_mod_lua_LDFLAGS = $(AM_LDFLAGS) -avoid-version -no-undefined $(freeswitch_LDFLAGS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
||||
test_test_mod_lua_LDADD = libluamod.la $(LUA_LIBS)
|
||||
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
noinst_PROGRAMS = test_mod_lua
|
||||
AM_CFLAGS = $(SWITCH_AM_CFLAGS)
|
||||
AM_LDFLAGS = $(switch_builddir)/libfreeswitch.la -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS)
|
||||
TESTS = $(noinst_PROGRAMS)
|
Loading…
Reference in New Issue