[sr-dev] git:master:6774d7ab: test Adding documentation on module test

Olle E. Johansson oej at edvina.net
Fri Jun 3 21:28:18 CEST 2016


Module: kamailio
Branch: master
Commit: 6774d7abf93bf8631c5bb498dc5158b9fbff247d
URL: https://github.com/kamailio/kamailio/commit/6774d7abf93bf8631c5bb498dc5158b9fbff247d

Author: Olle E. Johansson <oej at edvina.net>
Committer: Olle E. Johansson <oej at edvina.net>
Date: 2016-06-03T21:27:26+02:00

test Adding documentation on module test

At this point this is just ideas and a proposal. Let's test it. Includes ideas on
variant of the abort() function in cfg_utils

---

Added: test/README.md

---

Diff:  https://github.com/kamailio/kamailio/commit/6774d7abf93bf8631c5bb498dc5158b9fbff247d.diff
Patch: https://github.com/kamailio/kamailio/commit/6774d7abf93bf8631c5bb498dc5158b9fbff247d.patch

---

diff --git a/test/README.md b/test/README.md
new file mode 100644
index 0000000..0547475
--- /dev/null
+++ b/test/README.md
@@ -0,0 +1,26 @@
+Test directory
+===============
+
+Modules
+-------
+Note: Under development (2016-06-03 OEJ)
+
+Modules found here test APIs in other modules or are just created for testing, not for production
+use. In order to use the existing build system, each module needs a directory named mod_something
+in test. 
+
+Each module needs a subdirectory called "test" with a test configuration and a Makefile.
+
+A typical test script load the htable module and execute tests in the [event:htable_init]
+event route when starting. Typically, if a test fails, it runs abort() from the cfg_utils
+module to abort the process. 
+
+
+Ideas: We may need a way to exit kamailio from inside without dumping a core file, but simply
+stopping execution and returning different return values to the shell. That way a test
+config can run for a limited amount of time or until a test fails. We can also
+stop on an external action, like a RPC request calling the same function.
+
+Targets:
+	- "test":	Test syntax with "kamailio -c"
+	- "all":	Run full test




More information about the sr-dev mailing list