tinc/test
thorkill 4b6e956a2d Added first version of cmocka based unittest
To compile the test you will need cmocka installed on system.
Checks in configure.ac are still missing.

$ cd tinc/test/; make simple
to generate testing directory you can use cmocka-simple.sh
$ ./cmocka-simple.sh
‘mocks/conf1’ -> ‘/tmp/tmp.PtS9r796ns/conf1’
To run the test do: cd /tmp/tmp.PtS9r796ns ; ./simple

$ ./simple
[==========] Running 6 test(s).
[ RUN      ] test_edge_init
0 != 0x2
simple.c:73: error: Failure!

[  FAILED  ] test_edge_init
[ RUN      ] test_read_config_file
[       OK ] test_read_config_file
[ RUN      ] test_config_add_item
[       OK ] test_config_add_item
[ RUN      ] test_config_add_item_no_filename
value
simple.c:234: error: Failure!

[  FAILED  ] test_config_add_item_no_filename
[ RUN      ] test_splay_tree_init
[       OK ] test_splay_tree_init
[ RUN      ] test_splay_tree_basic
[       OK ] test_splay_tree_basic
[==========] 6 test(s) run.
[  PASSED  ] 4 test(s).
[  FAILED  ] 2 test(s), listed below:
[  FAILED  ] test_edge_init
[  FAILED  ] test_config_add_item_no_filename

 2 FAILED TEST(S)
2015-07-01 19:46:28 +02:00
..
mocks Added first version of cmocka based unittest 2015-07-01 19:46:28 +02:00
algorithms.test Allow Cipher and Digest "none". 2014-05-18 21:51:42 +02:00
basic.test Small fixes for tests. 2013-09-01 21:06:25 +02:00
cmocka-simple.sh Added first version of cmocka based unittest 2015-07-01 19:46:28 +02:00
commandline.test commandline.test: Adding test that fetching non-existing config setting really fails. 2014-08-07 23:02:12 +02:00
executables.test Start of a test suite. 2013-09-01 12:48:31 +02:00
import-export.test Also test whether tinc daemons can connect to each other after import/export. 2013-09-02 00:15:18 +02:00
invite-join.test Fix check for public key in invite-join.test. 2015-05-19 13:30:42 +02:00
Makefile.am removed afl atm 2015-06-30 18:48:48 +02:00
ns-ping.test Test two tinc daemons using network namespaces. 2014-01-24 16:17:09 +01:00
ping.test Test running ping through two tinc daemons. 2013-09-05 17:42:31 +02:00
pong.c Test running ping through two tinc daemons. 2013-09-05 17:42:31 +02:00
rsa-ed.test added test for deadlock scenario while upgrading to 1.1 2015-04-24 22:04:03 +02:00
simple.c Added first version of cmocka based unittest 2015-07-01 19:46:28 +02:00
sptps-basic.test Use Ed25519 keys. 2014-04-06 22:47:26 +02:00
testlib.sh Use Ed25519 keys. 2014-04-06 22:47:26 +02:00
variables.test Fixed variables.test testsuite after 'Make "tinc add" idempotent.' change. 2015-02-10 07:54:52 +01:00