[Asterisk-code-review] Add self test script. (testsuite[13])
Corey Farrell
asteriskteam at digium.com
Thu Apr 19 08:57:29 CDT 2018
Corey Farrell has uploaded this change for review. ( https://gerrit.asterisk.org/8833
Change subject: Add self_test script.
......................................................................
Add self_test script.
This script will be used by jenkins to run python unit tests. The
primary goal is to avoid having jenkins depend on location of the unit
tests.
Change-Id: Ie6fe082b1a2d46b229bab27abed97e85ad6c4f13
---
A self_test
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/33/8833/1
diff --git a/self_test b/self_test
new file mode 100755
index 0000000..131ce3e
--- /dev/null
+++ b/self_test
@@ -0,0 +1,21 @@
+#!/usr/bin/sh -e
+
+PYTHON=$(which python 2>/dev/null || true)
+
+if test -z "$PYTHON"; then
+ echo "No python binary found, cannot run any tests"
+ exit 1
+fi
+
+run_test() {
+ # Arguments: test_name python_name python_bin
+ if test -n "$3"; then
+ echo " ==> Executing $1 ($2)"
+ $3 lib/python/asterisk/${1}.py
+ fi
+}
+
+ALL_TESTS="buildoptions channel_test_condition sippversion"
+for i in $ALL_TESTS; do
+ run_test $i python $PYTHON
+done
--
To view, visit https://gerrit.asterisk.org/8833
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6fe082b1a2d46b229bab27abed97e85ad6c4f13
Gerrit-Change-Number: 8833
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180419/bd82d4e6/attachment-0001.html>
More information about the asterisk-code-review
mailing list