summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-02-10cmocka: Fix indentationJoseph Ates1-3/+3
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Include strings.h for strcasecmpEmil Velikov1-0/+4
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10tests: Add a group setup assert testAndreas Schneider2-0/+45
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-02-10cmocka: Print group setup and teardown errorsAndreas Schneider1-1/+15
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-12-18tests: Add test for call ordering functionalityJoseph Ates3-1/+218
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-12-18cmocka: Add support to verify call orderingJoseph Ates3-12/+322
2015-10-28Ignore all build and obj* directoresAndreas Schneider2-3/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-19INSTALL: Add Testing sectionAndreas Schneider1-0/+22
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-10-07INSTALL: Add example for WindowsAndreas Schneider1-1/+6
Looks like it isn't clear for some people reading that file that we support Windows and MSVC ...
2015-10-05src: Fix some compiler warningsAndreas Schneider1-5/+5
BUG: https://open.cryptomilk.org/issues/43
2015-09-30src: Use variable name for accessing the array elementsAndreas Schneider1-3/+3
2015-09-30include: Improve documentation for prestate macrosAndreas Schneider1-8/+10
2015-09-23cmocka: Allow to pass initial data to test casesPawel Szewczyk4-4/+63
Sometimes multiple test cases share the same test function, running it on different data. To pass this data to test functions we must define setup function for each data set. It's not very convienient when there are many states to test. This commit introduce more elegant way to pass data to tests. The initial_state field of CMUnitTest structure can be defined by user. It will be either passed to setup function, which makes any preparation needed, or it will be passed directly to test function when setup func is NULL. Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com>
2015-09-14src: Simplify exception_handler()Andreas Schneider1-3/+6
2015-09-14test: update test_segfault_recovery to try multiple faultsJonathon Reinhart1-0/+2
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-14Use sigsetjmp()/siglongjmp() when availableJonathon Reinhart3-4/+22
Without using siglongjmp, the signal mask is not restored when longjmp-ing from the signal handler, and whichever signal was being handled remains blocked for the remainder of the tests. As a result, the same signal cannot be caught twice, and will cause process termination when being raised the second time. This does not change 'jmp_buf global_expect_assert_env', because it is part of the public API, and isn't used from a signal handler. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-09-09src: Improve error reporting with cmocka default outputAndreas Schneider1-2/+13
Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-09-07src: Filter out invalid tests.Andreas Schneider1-9/+16
2015-08-04include: Protect config.h inclusionAndreas Schneider1-0/+2
Thanks to Gregory Pakosz. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-08-01include: Add va_copy macro if MSVC doesn't provide itAndreas Schneider1-0/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-07-07cmake: Fix warning on OSXAndreas Schneider1-0/+6
2015-07-07def: Add missing cmocka_set_message_output symbolAndreas Schneider1-0/+1
2015-05-11cmocka: Print skipped tests in group summaryPawel Szewczyk1-0/+14
When running tests with standard output, information about skipped tests can be useful, especially when there are many tests. This commit add number of skipped tests and list of them to group summary. Signed-off-by: Pawel Szewczyk <p.szewczyk@samsung.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-05-11gitignor: Ignore all object file directoriesAndreas Schneider1-1/+1
2015-05-11cmocka: Add subtests for groups using TAP outputEllie Timoney2-8/+23
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-03-12Bump version to 1.0.1Andreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-03-12Update ChangeLog.Andreas Schneider1-0/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-03-02cmocka: realloc(ptr, 0) should act as free(ptr)Niels de Vos2-0/+18
Currently, realloc(ptr, 0) does not free the pointer as specified by 'man 3 realloc': The realloc() function changes the size of the memory block pointed to by ptr to size bytes. [...] if size is equal to zero, and ptr is not NULL, then the call is equivalent to free(ptr). [...] This causes a leak of the allocated memory, and tests that use this particular realloc() pattern fail. Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-25Fix function types in doxygen docsJakub Hrozek1-2/+2
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-20cmake: Use https to drop results.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-20include: Add macro for assert_ptr_equal().Andreas Schneider1-0/+38
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-20include: Fix building with newer gcc versions.Andreas Schneider1-5/+2
__func__ is not a macro. We just need to define it on Windows for now. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-16cpack: Exclude object directories.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-16Bump version to 1.0.0.Andreas Schneider1-4/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-16Update ChangeLog.Andreas Schneider1-0/+12
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-13include: Use LargestIntegralType instead of uintmax_tAndreas Schneider1-26/+29
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-13include: Fix documentation for mock functionsAndreas Schneider1-7/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-13cmake: Disable some tests on Windows.Andreas Schneider1-0/+3
They work when executed manually but not with ctest. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12examples: Use WILL_FAIL instead of regular expressionAndreas Schneider1-7/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12cmake: Fix running examples on Windows.Andreas Schneider1-12/+8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12tests: Use a different regex for segfault on WindowsJakub Hrozek1-6/+14
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-12cmocka: examples: Fix assert macros usageKrzysztof Opasiak1-10/+3
Replace used macros with more suitable for given context. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12cmocka: Surround include info with code endcodeKrzysztof Opasiak1-1/+2
Doxygen makes list of includes hard to read when it is not explicitly marked as code. Surround it with code marks to improve readability. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12cmocka: Include cmocka_private.h after cmocka.hJakub Hrozek4-4/+4
cmocka_private.h uses WORDSIZE: # if __WORDSIZE == 64 # define __PRI64_PREFIX "l" But on some platforms, like Solaris, cmocka guesses its own WORDSIZE value in cmocka.h. Therefore it's important to include cmocka_private.h after cmocka.h
2015-02-12cmake: Always set correct output name.Andreas Schneider1-4/+8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12include: Correctly include signal.hAndreas Schneider2-1/+4
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12cmake: Fix executing test examples on Windows.Andreas Schneider3-12/+74
The executable need the path to dll set so they can be run successfully. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12cmake: Build tests with the static library.Andreas Schneider2-2/+6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-12include: Fix warning for missing __WORDSIZEAndreas Schneider2-0/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-11tests: Add io.h for open() and close() on Windows.Andreas Schneider3-0/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>