[asterisk-commits] testsuite: Update mixmonitor rxtx to test r() and t() options. (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Aug 14 11:56:52 CDT 2015
Mark Michelson has submitted this change and it was merged.
Change subject: testsuite: Update mixmonitor_rxtx to test r() and t() options.
......................................................................
testsuite: Update mixmonitor_rxtx to test r() and t() options.
ASTERISK-25322
Reported by Sean Pimental
Change-Id: I885a00ec93b6d3eb9d18a53034fa041404d1771d
---
M tests/apps/mixmonitor_rxtx/configs/ast1/extensions.conf
M tests/apps/mixmonitor_rxtx/run-test
M tests/apps/mixmonitor_rxtx/test-config.yaml
3 files changed, 34 insertions(+), 8 deletions(-)
Approvals:
Kevin Harwell: Looks good to me, but someone else must approve
Mark Michelson: Looks good to me, approved; Verified
Joshua Colp: Looks good to me, but someone else must approve
diff --git a/tests/apps/mixmonitor_rxtx/configs/ast1/extensions.conf b/tests/apps/mixmonitor_rxtx/configs/ast1/extensions.conf
index 6d3a4b9..0b9f0df 100644
--- a/tests/apps/mixmonitor_rxtx/configs/ast1/extensions.conf
+++ b/tests/apps/mixmonitor_rxtx/configs/ast1/extensions.conf
@@ -9,16 +9,20 @@
[test1]
exten => s,1,Answer()
-exten => s,n,MixMonitor(${TESTAUDIO1})
+exten => s,n,MixMonitor(${TESTAUDIO1},r(${TESTAUDIO1_RX})t(${TESTAUDIO1_TX}))
exten => s,n,Playback(${TALK_AUDIO})
exten => s,n,StopMixMonitor()
;If PlayBack fails, then StopMixMonitor has not yet let go of the file
exten => s,n,PlayBack(${TESTAUDIO1})
+exten => s,n,GoToIf($[${PLAYBACKSTATUS} = SUCCESS]?:stopnow)
+exten => s,n,PlayBack(${TESTAUDIO1_RX})
+exten => s,n,GoToIf($[${PLAYBACKSTATUS} = SUCCESS]?:stopnow)
+exten => s,n,PlayBack(${TESTAUDIO1_TX})
exten => s,n,GoToIf($[${PLAYBACKSTATUS} = SUCCESS]?domore:stopnow)
; StopMixMonitor failed to let go of the file as we could not play it back
exten => s,n(stopnow),HangUp()
; StopMixMonitor worked, now test stopping on hangup
-exten => s,n(domore),MixMonitor(${TESTAUDIO2})
+exten => s,n(domore),MixMonitor(${TESTAUDIO2},r(${TESTAUDIO2_RX})t(${TESTAUDIO2_TX}))
exten => s,n,Playback(${TALK_AUDIO})
exten => s,n,HangUp()
@@ -27,9 +31,13 @@
[test2]
; Test 2 verifies the TESTAUDIO2 file was released during hangup of the previous test
exten => s,1,PlayBack(${TESTAUDIO2})
+exten => s,n,GoToIf($[${PLAYBACKSTATUS} = SUCCESS]?:stopnow2)
+exten => s,n,PlayBack(${TESTAUDIO2_RX})
+exten => s,n,GoToIf($[${PLAYBACKSTATUS} = SUCCESS]?:stopnow2)
+exten => s,n,PlayBack(${TESTAUDIO2_TX})
exten => s,n,GoToIf($[${PLAYBACKSTATUS} = SUCCESS]?domore2:stopnow2)
exten => s,n(stopnow2),HangUp()
-exten => s,n(domore2),MixMonitor(${TESTAUDIO3})
+exten => s,n(domore2),MixMonitor(${TESTAUDIO3},r(${TESTAUDIO3_RX})t(${TESTAUDIO3_TX}))
exten => s,n,Playback(${TALK_AUDIO})
exten => s,n,HangUp()
diff --git a/tests/apps/mixmonitor_rxtx/run-test b/tests/apps/mixmonitor_rxtx/run-test
index 816ee3a..3522a32 100755
--- a/tests/apps/mixmonitor_rxtx/run-test
+++ b/tests/apps/mixmonitor_rxtx/run-test
@@ -41,8 +41,14 @@
# Remove any output files from a previous run
self.unlink_file(self.audiofile1 + ".raw")
+ self.unlink_file(self.audiofile1 + "_rx.raw")
+ self.unlink_file(self.audiofile1 + "_tx.raw")
self.unlink_file(self.audiofile2 + ".raw")
+ self.unlink_file(self.audiofile2 + "_rx.raw")
+ self.unlink_file(self.audiofile2 + "_tx.raw")
self.unlink_file(self.audiofile3 + ".raw")
+ self.unlink_file(self.audiofile3 + "_rx.raw")
+ self.unlink_file(self.audiofile3 + "_tx.raw")
self.talkingaudio = os.path.join(os.getcwd(), testdir + "/sounds/talking")
@@ -72,14 +78,20 @@
LOGGER.info("Checking MixMonitor recorded files...")
self.check_file("audiofile1", self.audiofile1 + ".raw")
+ self.check_file("audiofile1_rx", self.audiofile1 + "_rx.raw")
+ self.check_file("audiofile1_tx", self.audiofile1 + "_tx.raw")
# If this fails it is likely because StopMixMonitor never
# let go of audiofile1.
self.check_file("audiofile2", self.audiofile2 + ".raw")
+ self.check_file("audiofile2_rx", self.audiofile2 + "_rx.raw")
+ self.check_file("audiofile2_tx", self.audiofile2 + "_tx.raw")
# If this fails it is likely because MixMonitor never let
# go of audiofile2 on hangup.
self.check_file("audiofile3", self.audiofile3 + ".raw")
+ self.check_file("audiofile3_rx", self.audiofile3 + "_rx.raw")
+ self.check_file("audiofile3_tx", self.audiofile3 + "_tx.raw")
if self.passed:
LOGGER.info("Test Passed... All audio files are correct.")
@@ -123,13 +135,19 @@
self.read_result()
+ def set_test_audio_vars(self, varname, filename):
+ self.ami.setVar(channel="", variable=varname, value=filename)
+ self.ami.setVar(channel="", variable=varname + "_RX", value=filename + "_rx")
+ self.ami.setVar(channel="", variable=varname + "_TX", value=filename + "_tx")
+
def ami_connect(self, ami):
self.ami = ami
self.ami.registerEvent("UserEvent", self.check_test1)
- self.ami.setVar(channel="", variable="TESTAUDIO1", value=self.audiofile1)
- self.ami.setVar(channel="", variable="TESTAUDIO2", value=self.audiofile2)
- self.ami.setVar(channel="", variable="TESTAUDIO3", value=self.audiofile3)
+ self.set_test_audio_vars(varname="TESTAUDIO1", filename=self.audiofile1)
+ self.set_test_audio_vars(varname="TESTAUDIO2", filename=self.audiofile2)
+ self.set_test_audio_vars(varname="TESTAUDIO3", filename=self.audiofile3)
+
self.ami.setVar(channel="", variable="TALK_AUDIO", value=self.talkingaudio)
self.launch_test1()
diff --git a/tests/apps/mixmonitor_rxtx/test-config.yaml b/tests/apps/mixmonitor_rxtx/test-config.yaml
index bbe2aef..4641093 100644
--- a/tests/apps/mixmonitor_rxtx/test-config.yaml
+++ b/tests/apps/mixmonitor_rxtx/test-config.yaml
@@ -2,10 +2,10 @@
summary: 'Test MixMonitor and StopMixMonitor applications'
description: |
'This test verifies basic functionality of both the MixMonitor
- and StopMixMonitor applications.'
+ and StopMixMonitor applications for mixed/rx/tx file generation.'
properties:
- minversion: '1.8.0.0'
+ minversion: '13.6.0'
dependencies:
- python : 'twisted'
- python : 'starpy'
--
To view, visit https://gerrit.asterisk.org/1093
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I885a00ec93b6d3eb9d18a53034fa041404d1771d
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list