[asterisk-dev] Change in testsuite[master]: Enable support for directory containing custom tests.
Matt Jordan (Code Review)
asteriskteam at digium.com
Wed Apr 8 16:41:47 CDT 2015
Matt Jordan has submitted this change and it was merged.
Change subject: Enable support for directory containing custom tests.
......................................................................
Enable support for directory containing custom tests.
This change enables use of 'tests/custom/' as the place for
custom tests. If tests/custom/tests.yaml exists, it will be
loaded. This allows custom tests to be added without the
need to modify any tests.yaml files under Asterisk Testsuite
source control.
This recommended use of this feature is to clone another
repository into tests/custom, adding tests specific to
your own business, clients, or products using Asterisk.
Change-Id: Iff45fe5574900b5c5c77e3132984659133baadfd
---
M .gitignore
M README.txt
M runtests.py
M tests/tests.yaml
4 files changed, 19 insertions(+), 1 deletion(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Matt Jordan: Looks good to me, approved; Verified
Ashley Sanders: Looks good to me, but someone else must approve
diff --git a/.gitignore b/.gitignore
index b7f92b6..2a84c60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
/astroot
/contrib/valgrind/suppressions.txt
/logs
+/tests/custom
diff --git a/README.txt b/README.txt
index f6c5b80..4ebbd94 100644
--- a/README.txt
+++ b/README.txt
@@ -21,6 +21,7 @@
5) Test Configuration
6) Tests in Python
7) Tests in Lua
+ 8) Custom Tests
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -543,5 +544,19 @@
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
+--- 8) Custom Tests
+--------------------------------------------------------------------------------
+
+ The testsuite supports automatic use of custom tests. This feature is
+activated by creating tests/custom/tests.yaml to list your tests and/or folders
+of tests. Any files created in tests/custom will be ignored by the Asterisk
+testsuite repository. This folder is designed to be used for tests that are
+not appropriate for inclusion in the common testsuite. This can include tests
+specific for your business, clients or Asterisk based product.
+
+--------------------------------------------------------------------------------
+--------------------------------------------------------------------------------
+
================================================================================
================================================================================
diff --git a/runtests.py b/runtests.py
index f745266..c4d2cda 100755
--- a/runtests.py
+++ b/runtests.py
@@ -335,7 +335,8 @@
try:
f = open("%s/%s" % (test_dir, TESTS_CONFIG), "r")
except IOError:
- print "Failed to open %s/%s" % (test_dir, TESTS_CONFIG)
+ if test_dir != "tests/custom":
+ print "Failed to open %s/%s" % (test_dir, TESTS_CONFIG)
return tests
except:
print "Unexpected error: %s" % sys.exc_info()[0]
diff --git a/tests/tests.yaml b/tests/tests.yaml
index 59f66bb..52b63aa 100644
--- a/tests/tests.yaml
+++ b/tests/tests.yaml
@@ -1,6 +1,7 @@
# Enter tests here in the order they should be considered for execution:
tests:
- test: 'example'
+ - dir: 'custom'
- test: 'dynamic-modules'
- dir: 'manager'
- dir: 'cdr'
--
To view, visit https://gerrit.asterisk.org/27
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iff45fe5574900b5c5c77e3132984659133baadfd
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-dev
mailing list