[Asterisk-code-review] tests: use datadir for sound files (asterisk[14])
George Joseph
asteriskteam at digium.com
Tue Jan 24 08:35:08 CST 2017
George Joseph has uploaded a new change for review. ( https://gerrit.asterisk.org/4778 )
Change subject: tests: use datadir for sound files
......................................................................
tests: use datadir for sound files
Some (voicemail-related) tests API symlinks beep.gsm and other files
from ast_config_AST_VAR_DIR. It should use ast_config_AST_DATA_DIR.
ASTERISK-26740 #close
Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89
---
M apps/app_voicemail.c
M tests/test_voicemail_api.c
2 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/78/4778/1
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 300dc18..fe76bc0 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -14395,7 +14395,7 @@
ast_log(AST_LOG_WARNING, "Failed to make test directory\n");
goto exit_vmsayname_test;
}
- snprintf(dir, sizeof(dir), "%s/sounds/beep.gsm", ast_config_AST_VAR_DIR);
+ snprintf(dir, sizeof(dir), "%s/sounds/beep.gsm", ast_config_AST_DATA_DIR);
snprintf(dir2, sizeof(dir2), "%s%s/%s/greet.gsm", VM_SPOOL_DIR, TEST_CONTEXT, TEST_EXTENSION);
/* we're not going to hear the sound anyway, just use a valid gsm audio file */
if ((res = symlink(dir, dir2))) {
@@ -14641,8 +14641,8 @@
break;
}
- snprintf(attach, sizeof(attach), "%s/sounds/en/tt-weasels", ast_config_AST_VAR_DIR);
- snprintf(attach2, sizeof(attach2), "%s/sounds/en/tt-somethingwrong", ast_config_AST_VAR_DIR);
+ snprintf(attach, sizeof(attach), "%s/sounds/en/tt-weasels", ast_config_AST_DATA_DIR);
+ snprintf(attach2, sizeof(attach2), "%s/sounds/en/tt-somethingwrong", ast_config_AST_DATA_DIR);
if (!(vmu = find_user(&vmus, testcontext, testmailbox)) &&
!(vmu = find_or_create(testcontext, testmailbox))) {
diff --git a/tests/test_voicemail_api.c b/tests/test_voicemail_api.c
index fc371ba..8c173d0 100644
--- a/tests/test_voicemail_api.c
+++ b/tests/test_voicemail_api.c
@@ -462,7 +462,7 @@
folder_path, snapshot->msg_number);
snprintf(snd_path, sizeof(snd_path), "%s/msg%04u.gsm",
folder_path, snapshot->msg_number);
- snprintf(beep_path, sizeof(beep_path), "%s/sounds/en/beep.gsm", ast_config_AST_VAR_DIR);
+ snprintf(beep_path, sizeof(beep_path), "%s/sounds/en/beep.gsm", ast_config_AST_DATA_DIR);
if (test_vm_api_create_voicemail_folder(folder_path)) {
return 1;
--
To view, visit https://gerrit.asterisk.org/4778
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id49c56fb9e16df64b1a2b829693ca7601252df89
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
More information about the asterisk-code-review
mailing list