summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-02-10tests: Add message output format testsJakub Hrozek1-0/+62
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-10cmocka: Add a newline to subunit error outputJakub Hrozek1-1/+1
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-10cmocka: Print test errors directly to make them included in the XML outputJakub Hrozek1-0/+2
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-10docs: Mark the old test runner functions as deprecatedJakub Hrozek1-10/+30
Marks the old test runner functions as @deprecated in the doxygen config Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-09cmake: Add ctest script.Andreas Schneider1-0/+74
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-09Add cmockery legacy header.Andreas Schneider6-1/+49
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-09include: Add Programming by Contract header.Luis Pabón2-0/+63
Signed-off-by: Luis Pabón <lpabon@redhat.com>
2015-02-09cmocka: Add support for skipping a testJakub Hrozek4-3/+81
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-09cmocka: Add Test Anything Protocol message outputAndreas Schneider3-5/+80
This adds support to print test reporting in the Test Anything Protocol. See http://testanything.org/tap-specification.html Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-09cmocka: Add support for xunit reportsJakub Hrozek2-5/+100
Pair-Programmed-With: Andreas Schneider <asn@cryptomilk.org> Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se> Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Add subunit message output typeJakub Hrozek2-3/+67
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-08cmocka: Add a function to select the message output typeJakub Hrozek2-7/+43
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-08doc: Update cmocka documentation for new environment variablesJakub Hrozek1-0/+17
Adds documentation for the new XML and subunit output. Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-08doc: Update cmocka documentation for new test runner.Andreas Schneider2-951/+1393
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Mark run_tests as deprecated.Andreas Schneider1-53/+13
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Add new message printing formatter for testcasesJakub Hrozek1-17/+119
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-08tests: Add a test for failing group setupJakub Hrozek2-0/+42
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-08tests: Use new cmocka test runner in our tests and examplesAndreas Schneider17-107/+128
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Add support to print errors into a buffer.Andreas Schneider1-70/+146
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Add correct checks for clock_gettime().Andreas Schneider3-3/+49
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Implement a new test runner.Andreas Schneider3-1/+533
Pair-Programmed-With: Jakub Hrozek <jakub.hrozek@posteo.se> Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-08tests: Add tests for test_malloc() and test_realloc().Andreas Schneider2-0/+72
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Add explicit libc_alloc, realloc, freeJakub Hrozek1-0/+21
Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
2015-02-08cmocka: Add a test_realloc() function.Andreas Schneider2-0/+57
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Allow test_free() to deal with NULL pointers.Andreas Schneider1-1/+5
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Make global variables thread local.Andreas Schneider1-7/+15
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmake: Add configure checks for thread local storage.Andreas Schneider2-0/+21
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08config: Remove unused options.Andreas Schneider1-15/+0
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Use ARRAY_SIZE everywhere.Andreas Schneider1-8/+5
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08config: Fix define for strsignal().Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-08cmocka: Fix setting size_of_set in expect_set().Andreas Schneider1-0/+1
BUG: https://open.cryptomilk.org/issues/34 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-08-07GNU_SOURCE is not a compiler flagJakub Hrozek1-4/+1
This line in DefineCompilerFlags.cmake always passed: check_c_compiler_flag("-D_GNU_SOURCE" WITH_GNU_SOURCE) because -D$string just defined a preprocessor macro, so the compilation would always succeed. On UNIX platforms, with GCC or LLVM compilers, we want to always use GNU_SOURCE.
2014-08-07cmake: Use standard cmake variables in CMakeLists.txt.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-07-28cmocka: do not use # with the %p printf modifierEmil Velikov1-1/+1
Missed out during while amending commit 61b2b557951(cmocka: use %p to printf a pointer). Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-07-28cmocka: use ISO C99 PRIu64 over LargestIntegralTypePrintfUnsignedFormatEmil Velikov2-22/+18
With commit commit 8642ef21b07(cmocka: introduce LargestIntegralTypePrintfUnsignedFormat modifier) we introduces this superfluous macro in order to work around the differences when printing 64bit unsigned integer values. Rather than reinventing the wheel use the C99's PRIu64 and fall back locally to their platform/compiler specific counterparts if the inttypes.h header does not exist. Thanks to scythe from the #cmocka channel for pointing out. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-07-23cmocka: introduce LargestIntegralTypePrintfUnsignedFormat modifierEmil Velikov2-7/+24
The modifier is almost identical to LargestIntegralTypePrintfFormat in terms that it handles 64bit integer values, but unlike the latter it prints them as unsigned value. Behind the scenes it uses %I64u for windows, and %llu otherwise. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-07-23cmocka: use %p to printf a pointerEmil Velikov1-1/+1
Allegedly some versions of MSVC do not prefix the address with 0x whenever %p is used, while gcc (mingw-w64) always do. There is no clear way around this without providing a custom define, which currently is an overkill imho, as there is only one use-case. Silences the following warning when building with mingw-w64 cmocka/src/cmocka.c:1636:25: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘PVOID’ [-Wformat=] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-29cmocka: fix doxygen comment for assert_not_in_range()Michael Adam1-2/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-29cmocka: fix doxygen comment for assert_in_range()Michael Adam1-2/+2
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-29cmocka: fix doxygen comment for assert_return_code()Michael Adam1-1/+1
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-05-22Bump version to 0.4.1.Andreas Schneider2-2/+9
2014-05-22cmake: Fix cmocka cmake-config files.Andreas Schneider2-7/+9
2014-05-20doc: Improve documentation for fail_msg().Andreas Schneider1-0/+11
BUG: https://open.cryptomilk.org/issues/29 Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2014-04-16cmake: Install cmake config to the correct directory.Andreas Schneider1-1/+1
2014-04-15cmocka: Fix type of number_of_test_states which can be negative.Andreas Schneider1-3/+4
2014-04-15Correctly report the number of tests without the number of setup/teardown ↵Sebastian Dröge1-4/+16
functions included Reviewed-by: Andreas Schneider <asn@samba.org>
2014-04-15cmocka: Add CMOCKA_TEST_ABORT env variable to leave threading apps.Andreas Schneider2-2/+21
BUG: https://open.cryptomilk.org/issues/26 Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
2014-04-15coverity: Add _assert_return_code model.Andreas Schneider1-0/+10
2014-04-14cmake: Ignore .ycm_extra_conf.pyc.Andreas Schneider1-1/+1
2014-04-11doc: Document the group functions.Andreas Schneider1-0/+2