[Asterisk-code-review] CI: Add --test-timeout option to runTestsuite.sh (asterisk[13.23])

Joshua Colp asteriskteam at digium.com
Thu Sep 27 06:23:30 CDT 2018


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/10277 )

Change subject: CI:  Add --test-timeout option to runTestsuite.sh
......................................................................

CI:  Add --test-timeout option to runTestsuite.sh

The default is 600 seconds.
Also added timeouts to the *TestGroups.json files.

Change-Id: I8ab6a69e704b6a10f06a0e52ede02312a2b72fe0
---
M tests/CI/gateTestGroups.json
M tests/CI/periodic-dailyTestGroups.json
M tests/CI/runTestsuite.sh
3 files changed, 18 insertions(+), 2 deletions(-)

Approvals:
  Corey Farrell: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/tests/CI/gateTestGroups.json b/tests/CI/gateTestGroups.json
index 7c8b917..d048896 100644
--- a/tests/CI/gateTestGroups.json
+++ b/tests/CI/gateTestGroups.json
@@ -2,46 +2,55 @@
 	{
 		"name": "ari1",
 		"dir": "tests/CI/output/ari1",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "--test-regex=tests/rest_api/[Ca-d]"
 	},
 	{
 		"name": "ari2",
 		"dir": "tests/CI/output/ari2",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "--test-regex=tests/rest_api/[e-z]"
 	},
 	{
 		"name": "pjs1",
 		"dir": "tests/CI/output/pjsip1",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "--test-regex=tests/channels/pjsip/[a-f]"
 	},
 	{
 		"name": "pjs2",
 		"dir": "tests/CI/output/pjsip2",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "--test-regex=tests/channels/pjsip/[g-r]"
 	},
 	{
 		"name": "pjs3",
 		"dir": "tests/CI/output/pjsip3",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "--test-regex=tests/channels/pjsip/[s-z]"
 	},
 	{
 		"name": "sip1",
 		"dir": "tests/CI/output/sip1",
+		"runTestsuiteOptions": "--test-timeout=240",
 		"testcmd": "--test-regex=tests/channels/SIP/[Sa-r]"
 	},
 	{
 		"name": "sip2",
 		"dir": "tests/CI/output/sip2",
+		"runTestsuiteOptions": "--test-timeout=240",
 		"testcmd": "--test-regex=tests/channels/SIP/[s-z]"
 	},
 	{
 		"name": "iax ",
 		"dir": "tests/CI/output/iax2_local",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": " -t tests/channels/iax2 -t tests/channels/local"
 	},
 	{
 		"name": "mwi ",
 		"dir": "tests/CI/output/extmwi",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "--test-regex=tests/channels/pjsip/.*mwi"
 	}
 ]
diff --git a/tests/CI/periodic-dailyTestGroups.json b/tests/CI/periodic-dailyTestGroups.json
index 9136032..7f0fd7e 100644
--- a/tests/CI/periodic-dailyTestGroups.json
+++ b/tests/CI/periodic-dailyTestGroups.json
@@ -2,37 +2,43 @@
 	{
 		"name": "ari ",
 		"dir": "tests/CI/output/ari",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "-t tests/rest_api/"
 	},
 	{
 		"name": "pjs ",
 		"dir": "tests/CI/output/pjsip",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": "-t tests/channels/pjsip"
 	},
 	{
 		"name": "sip ",
 		"dir": "tests/CI/output/sip",
+		"runTestsuiteOptions": "--test-timeout=240",
 		"testcmd": "-t tests/channels/SIP"
 	},
 	{
 		"name": "iax ",
 		"dir": "tests/CI/output/iax2_local",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": " -t tests/channels/iax2 -t tests/channels/local"
 	},
 	{
 		"name": "apps",
 		"dir": "tests/CI/output/agi-apps",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": " -t tests/agi -t tests/apps -t blind-transfer-parkingtimeout"
 	},
 	{
 		"name": "othr",
 		"dir": "tests/CI/output/other",
+		"runTestsuiteOptions": "--test-timeout=180",
 		"testcmd": " -T tests/(apps|agi|blind-transfer-parkingtimeout|rest_api|channels|realtime|example|skeleton_test|remote-test)"
 	},
 	{
 		"name": "real",
 		"dir": "tests/CI/output/realtime",
-		"runTestsuiteOptions": "--realtime --initialize-db --cleanup-db",
+		"runTestsuiteOptions": "--test-timeout=180 --realtime --initialize-db --cleanup-db",
 		"testcmd": " -t tests/channels/pjsip -G realtime-incompatible"
 	}
 ]
diff --git a/tests/CI/runTestsuite.sh b/tests/CI/runTestsuite.sh
index 0778a2b..9ee7718 100755
--- a/tests/CI/runTestsuite.sh
+++ b/tests/CI/runTestsuite.sh
@@ -1,6 +1,7 @@
 #!/usr/bin/env bash
 CIDIR=$(dirname $(readlink -fn $0))
 REALTIME=0
+TEST_TIMEOUT=600
 source $CIDIR/ci.functions
 ASTETCDIR=$DESTDIR/etc/asterisk
 
@@ -14,7 +15,7 @@
 
 export PYTHONPATH=./lib/python/
 echo "Running tests ${TESTSUITE_COMMAND}"
-./runtests.py --cleanup ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :
+./runtests.py --cleanup --timeout=${TEST_TIMEOUT} ${TESTSUITE_COMMAND} | contrib/scripts/pretty_print --no-color --no-timer --term-width=120 --show-errors || :
 
 if [ $REALTIME -eq 1 ] ; then
 	$CIDIR/teardownRealtime.sh --cleanup-db=${CLEANUP_DB:?0}

-- 
To view, visit https://gerrit.asterisk.org/10277
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13.23
Gerrit-MessageType: merged
Gerrit-Change-Id: I8ab6a69e704b6a10f06a0e52ede02312a2b72fe0
Gerrit-Change-Number: 10277
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2 (1000185)
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180927/ab7992e0/attachment.html>


More information about the asterisk-code-review mailing list