[Pkg-voip-commits] [asterisk] 05/07: tests-fix-datadir.patch: a problem in tests
tzafrir at debian.org
tzafrir at debian.org
Sun Jan 22 02:06:30 UTC 2017
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch test-enable
in repository asterisk.
commit 81192c4be6fb314d84751ddfcfca38a4626748b9
Author: Tzafrir Cohen <tzafrir at debian.org>
Date: Sat Jan 21 23:19:13 2017 +0200
tests-fix-datadir.patch: a problem in tests
---
debian/patches/series | 2 ++
debian/patches/tests-fix-datadir.patch | 56 ++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/debian/patches/series b/debian/patches/series
index a80c545..9e5b45a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -40,3 +40,5 @@ OpenSSL-1.1.0-support-2.patch
pjsip_unresolved_symbol.patch
pjsip_improve_logging.patch
+
+tests-fix-datadir.patch
diff --git a/debian/patches/tests-fix-datadir.patch b/debian/patches/tests-fix-datadir.patch
new file mode 100644
index 0000000..d16712e
--- /dev/null
+++ b/debian/patches/tests-fix-datadir.patch
@@ -0,0 +1,56 @@
+From dbb9c8141d2a72b36334b7e9044a4fe06217c0f1 Mon Sep 17 00:00:00 2001
+From: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
+Date: Sat, 21 Jan 2017 22:43:48 +0200
+Subject: [PATCH] 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
+---
+ apps/app_voicemail.c | 6 +++---
+ tests/test_voicemail_api.c | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
+index 03273c69bc..37f8aa96f5 100644
+--- a/apps/app_voicemail.c
++++ b/apps/app_voicemail.c
+@@ -14393,7 +14393,7 @@ AST_TEST_DEFINE(test_voicemail_vmsayname)
+ 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))) {
+@@ -14639,8 +14639,8 @@ AST_TEST_DEFINE(test_voicemail_notify_endl)
+ 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 9cadf2394e..77b538ef85 100644
+--- a/tests/test_voicemail_api.c
++++ b/tests/test_voicemail_api.c
+@@ -460,7 +460,7 @@ static int test_vm_api_create_voicemail_files(const char *context, const char *m
+ 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;
+--
+2.11.0
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git
More information about the Pkg-voip-commits
mailing list