More ticket #543: added ICE test

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@2017 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip-apps/src/test-pjsua/inc_cfg.py b/pjsip-apps/src/test-pjsua/inc_cfg.py
index a800fe5..7859cd8 100644
--- a/pjsip-apps/src/test-pjsua/inc_cfg.py
+++ b/pjsip-apps/src/test-pjsua/inc_cfg.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 

 DEFAULT_ECHO = True

 DEFAULT_TRACE = True

diff --git a/pjsip-apps/src/test-pjsua/inc_const.py b/pjsip-apps/src/test-pjsua/inc_const.py
index b702234..8ce13f0 100644
--- a/pjsip-apps/src/test-pjsua/inc_const.py
+++ b/pjsip-apps/src/test-pjsua/inc_const.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 # Useful constants

 

 

diff --git a/pjsip-apps/src/test-pjsua/inc_param.py b/pjsip-apps/src/test-pjsua/inc_param.py
index 7fa2371..2d5c812 100644
--- a/pjsip-apps/src/test-pjsua/inc_param.py
+++ b/pjsip-apps/src/test-pjsua/inc_param.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 ###########################################

 # pjsua instantiation parameter

 class Pjsua:

diff --git a/pjsip-apps/src/test-pjsua/mod_call.py b/pjsip-apps/src/test-pjsua/mod_call.py
index 07f5a0e..845ed8d 100644
--- a/pjsip-apps/src/test-pjsua/mod_call.py
+++ b/pjsip-apps/src/test-pjsua/mod_call.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 import time

 import imp

 import sys

diff --git a/pjsip-apps/src/test-pjsua/mod_run.py b/pjsip-apps/src/test-pjsua/mod_run.py
index c5e475d..34171e4 100644
--- a/pjsip-apps/src/test-pjsua/mod_run.py
+++ b/pjsip-apps/src/test-pjsua/mod_run.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 import imp

 import sys

 import inc_param as param

diff --git a/pjsip-apps/src/test-pjsua/run.py b/pjsip-apps/src/test-pjsua/run.py
index 4a7c0d3..e84de34 100644
--- a/pjsip-apps/src/test-pjsua/run.py
+++ b/pjsip-apps/src/test-pjsua/run.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 import sys

 import imp

 import re

diff --git a/pjsip-apps/src/test-pjsua/runall.py b/pjsip-apps/src/test-pjsua/runall.py
new file mode 100644
index 0000000..0ded114
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/runall.py
@@ -0,0 +1,37 @@
+# $Id:$
+import os
+import sys
+
+# Initialize test list
+tests = []
+
+# Excluded tests (because they fail?)
+excluded_tests = [ "svn",
+		   "pyc",
+		   "scripts-call/150_srtp_1_2",
+		   "scripts-call/150_srtp_2_1",
+                   "scripts-call/300_ice_1_1"]
+
+# Add all tests in "scripts-run" directory.
+for f in os.listdir("scripts-run"):
+    tests.append("mod_run.py scripts-run/" + f)
+
+# Add all tests in "scripts-call" directory.
+for f in os.listdir("scripts-call"):
+    tests.append("mod_call.py scripts-call/" + f)
+
+# Filter-out excluded tests
+for pat in excluded_tests:
+    tests = [t for t in tests if t.find(pat)==-1]
+
+# Now run the tests
+for t in tests:
+	cmdline = "python run.py " + t
+	print "Running " + cmdline
+	ret = os.system(cmdline + " > output.log")
+	if ret != 0:
+		print "Test " + t + " failed."
+		print "Please see 'output.log' for the test log."
+		sys.exit(1)
+
+print "All tests completed successfully"
diff --git a/pjsip-apps/src/test-pjsua/scripts-call/100_simplecall.py b/pjsip-apps/src/test-pjsua/scripts-call/100_simplecall.py
index 52dcfed..1bfb960 100644
--- a/pjsip-apps/src/test-pjsua/scripts-call/100_simplecall.py
+++ b/pjsip-apps/src/test-pjsua/scripts-call/100_simplecall.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 #

 import inc_cfg

 

diff --git a/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_0_1.py b/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_0_1.py
index 319c470..69651c8 100644
--- a/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_0_1.py
+++ b/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_0_1.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 #

 import inc_cfg

 

diff --git a/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_0.py b/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_0.py
index ce886a6..cd9d50b 100644
--- a/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_0.py
+++ b/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_0.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 #

 import inc_cfg

 

diff --git a/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_1.py b/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_1.py
index 6a58b53..2a8ece5 100644
--- a/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_1.py
+++ b/pjsip-apps/src/test-pjsua/scripts-call/150_srtp_1_1.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 #

 import inc_cfg

 

diff --git a/pjsip-apps/src/test-pjsua/scripts-call/200_tcp.py b/pjsip-apps/src/test-pjsua/scripts-call/200_tcp.py
index 62bdee1..0c96c46 100644
--- a/pjsip-apps/src/test-pjsua/scripts-call/200_tcp.py
+++ b/pjsip-apps/src/test-pjsua/scripts-call/200_tcp.py
@@ -1,8 +1,8 @@
-# $Id:$
+# $Id$
 #
 import inc_cfg
 
-# Simple call
+# TCP call
 config = inc_cfg.CallConfig(
 		title = "TCP transport",
 		callee_cfg = inc_cfg.Config(arg="--null-audio --no-udp"),
diff --git a/pjsip-apps/src/test-pjsua/scripts-call/300_ice_0_1.py b/pjsip-apps/src/test-pjsua/scripts-call/300_ice_0_1.py
new file mode 100644
index 0000000..f95cba7
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-call/300_ice_0_1.py
@@ -0,0 +1,10 @@
+# $Id:$
+#
+import inc_cfg
+
+# ICE mismatch
+config = inc_cfg.CallConfig(
+		title = "Callee=no ICE, caller=use ICE",
+		callee_cfg = inc_cfg.Config(arg="--null-audio"),
+		caller_cfg = inc_cfg.Config(arg="--null-audio --use-ice")
+		)
diff --git a/pjsip-apps/src/test-pjsua/scripts-call/300_ice_1_0.py b/pjsip-apps/src/test-pjsua/scripts-call/300_ice_1_0.py
new file mode 100644
index 0000000..c4dbe9b
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-call/300_ice_1_0.py
@@ -0,0 +1,10 @@
+# $Id:$
+#
+import inc_cfg
+
+# ICE mismatch
+config = inc_cfg.CallConfig(
+		title = "Callee=use ICE, caller=no ICE",
+		callee_cfg = inc_cfg.Config(arg="--null-audio --use-ice"),
+		caller_cfg = inc_cfg.Config(arg="--null-audio")
+		)
diff --git a/pjsip-apps/src/test-pjsua/scripts-call/300_ice_1_1.py b/pjsip-apps/src/test-pjsua/scripts-call/300_ice_1_1.py
new file mode 100644
index 0000000..19a3232
--- /dev/null
+++ b/pjsip-apps/src/test-pjsua/scripts-call/300_ice_1_1.py
@@ -0,0 +1,10 @@
+# $Id:$
+#
+import inc_cfg
+
+# ICE mismatch
+config = inc_cfg.CallConfig(
+		title = "Callee=use ICE, caller=use ICE",
+		callee_cfg = inc_cfg.Config(arg="--null-audio --use-ice"),
+		caller_cfg = inc_cfg.Config(arg="--null-audio --use-ice")
+		)
diff --git a/pjsip-apps/src/test-pjsua/scripts-run/100_simple.py b/pjsip-apps/src/test-pjsua/scripts-run/100_simple.py
index e356303..b0b9651 100644
--- a/pjsip-apps/src/test-pjsua/scripts-run/100_simple.py
+++ b/pjsip-apps/src/test-pjsua/scripts-run/100_simple.py
@@ -1,4 +1,4 @@
-# $Id$

+# $Id:$

 #

 # Just about the simple pjsua command line parameter, which should

 # never fail in any circumstances