[OpenSIPS-Devel] [OpenSIPS/opensips] 2d3c07: Add a basic unit testing framework
Liviu Chircu
liviu at opensips.org
Wed Feb 14 14:04:46 EST 2018
Branch: refs/heads/feature/cachedb-column-oriented-api
Home: https://github.com/OpenSIPS/opensips
Commit: 2d3c0733db83b5b70f092a1337bbe11c268d47a4
https://github.com/OpenSIPS/opensips/commit/2d3c0733db83b5b70f092a1337bbe11c268d47a4
Author: Liviu Chircu <liviu at opensips.org>
Date: 2018-02-14 (Wed, 14 Feb 2018)
Changed paths:
M Makefile
M Makefile.conf.template
M Makefile.defs
A Makefile.test
A cachedb/test/test_backends.c
A cachedb/test/test_backends.h
M globals.h
M main.c
M net/trans.c
M sr_module.c
M str.h
A test/unit_tests.c
A test/unit_tests.h
Log Message:
-----------
Add a basic unit testing framework
Currently, this framework only supports writing unit tests for core
code, but there are plans to expand it such that module tests can be
easily written as well.
The chosen C unit testing framework is libtap
(https://github.com/zorgnax/libtap) - very lightweight and full of goodies.
In order to write a core unit test, you should write the test file
under a "test/" dir which resides right next to the tested file. The
build system is smart enough to link any such test files placed in
random test dirs all across the core codebase. Next, you enrol your
test file to be init'ed and run in test/unit_tests.c, and you're done.
To run the entire unit testing suite, just do "make test". You will
have to type this command twice if you haven't enabled "-DUNIT_TESTS"
under Makefile.conf beforehand.
Commit: b3ef9c18956e8801181d9f7a45edadded9aea444
https://github.com/OpenSIPS/opensips/commit/b3ef9c18956e8801181d9f7a45edadded9aea444
Author: Liviu Chircu <liviu at opensips.org>
Date: 2018-02-14 (Wed, 14 Feb 2018)
Changed paths:
M cfg.y
M sr_module.c
M sr_module.h
M test/unit_tests.c
Log Message:
-----------
core: Refactor the mpath-related code into a function
Commit: 0a08c9e16fe5d939c01136b0a4e9c279f8838d5e
https://github.com/OpenSIPS/opensips/commit/0a08c9e16fe5d939c01136b0a4e9c279f8838d5e
Author: Liviu Chircu <liviu at opensips.org>
Date: 2018-02-14 (Wed, 14 Feb 2018)
Changed paths:
M cachedb/cachedb.h
M cachedb/cachedb_cap.h
A cachedb/cachedb_dtype.h
Log Message:
-----------
cachedb: Extend the headerfiles with dict-aware prototypes
Compare: https://github.com/OpenSIPS/opensips/compare/2d3c0733db83^...0a08c9e16fe5
More information about the Devel
mailing list