platform/upstream/cmocka.git
6 years agopackaging: Add packaging for generating RPM package 97/137097/1 accepted/tizen_4.0_unified accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix sandbox/backup/cmocka_1.1.1_20221227 tizen_4.0 tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix tizen_6.0 tizen_6.0_hotfix tizen_6.5 tizen_7.0 tizen_7.0_hotfix accepted/tizen/4.0/unified/20170816.013514 accepted/tizen/4.0/unified/20170828.222418 accepted/tizen/5.0/unified/20181102.024057 accepted/tizen/5.5/unified/20191031.004702 accepted/tizen/5.5/unified/mobile/hotfix/20201027.062459 accepted/tizen/5.5/unified/wearable/hotfix/20201027.102659 accepted/tizen/6.0/unified/20201030.104412 accepted/tizen/6.0/unified/hotfix/20201102.235931 accepted/tizen/6.5/unified/20211028.223301 accepted/tizen/7.0/unified/20221110.063320 accepted/tizen/7.0/unified/hotfix/20221116.110646 accepted/tizen/unified/20170705.163442 submit/tizen/20170705.094846 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100005 submit/tizen_5.0/20181101.000006 submit/tizen_5.5/20191031.000006 submit/tizen_5.5_mobile_hotfix/20201026.185106 submit/tizen_5.5_wearable_hotfix/20201026.184306 submit/tizen_6.0/20201029.205501 submit/tizen_6.0_hotfix/20201102.192901 submit/tizen_6.0_hotfix/20201103.115101 submit/tizen_6.5/20211028.163301 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release tizen_5.5.m2_release tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release
Krzysztof Opasiak [Mon, 3 Jul 2017 11:13:03 +0000 (13:13 +0200)]
packaging: Add packaging for generating RPM package

Change-Id: I0f6792555797b758c2bdca16fb424b2ae83a613c
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
6 years agosrc: Initialize teardown_name to fix a build warning sandbox/kopasiak/upstream
Andreas Schneider [Thu, 22 Jun 2017 07:29:57 +0000 (09:29 +0200)]
src: Initialize teardown_name to fix a build warning

BUG #60

7 years agoBump version to 1.1.1 cmocka-1.1.1
Andreas Schneider [Fri, 7 Apr 2017 14:16:13 +0000 (16:16 +0200)]
Bump version to 1.1.1

7 years agocmocka: Change define to HAVE_CLOCK_REALTIME
Andreas Schneider [Fri, 7 Apr 2017 14:09:48 +0000 (16:09 +0200)]
cmocka: Change define to HAVE_CLOCK_REALTIME

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
7 years agosrc: Do not use C++ keywords as local variables
Andreas Schneider [Wed, 5 Apr 2017 08:16:15 +0000 (10:16 +0200)]
src: Do not use C++ keywords as local variables

7 years agoFix TAP output and summary.
Stas Kobzar [Tue, 4 Apr 2017 15:06:15 +0000 (11:06 -0400)]
Fix TAP output and summary.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
7 years agoUpdate doxygen config
Andreas Schneider [Tue, 7 Mar 2017 12:36:25 +0000 (13:36 +0100)]
Update doxygen config

7 years agodoxygen: Allow space in path names
Martin Fischer [Sat, 21 Jan 2017 08:55:14 +0000 (09:55 +0100)]
doxygen: Allow space in path names

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
7 years agoRemove dangling unit test source file.
Terje Runde [Sat, 3 Dec 2016 19:14:18 +0000 (20:14 +0100)]
Remove dangling unit test source file.

7 years agocmake: Add -Wstrict-prototypes during build
Andreas Schneider [Sat, 12 Nov 2016 11:13:13 +0000 (12:13 +0100)]
cmake: Add -Wstrict-prototypes during build

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
7 years agosrc: Add support for compile flag -Wstrict-prototypes
Adrian Friedli [Tue, 25 Oct 2016 08:57:21 +0000 (10:57 +0200)]
src: Add support for compile flag -Wstrict-prototypes

7 years agocmocka: Leave if expected_call is NULL
Andreas Schneider [Mon, 7 Nov 2016 07:03:10 +0000 (08:03 +0100)]
cmocka: Leave if expected_call is NULL

CID 1365415

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
7 years agoFixed xUnit output durations
Adrien Marc [Tue, 4 Oct 2016 16:18:42 +0000 (18:18 +0200)]
Fixed xUnit output durations

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
7 years agoThis patch allows cmocka to be run under windows 64-bit
Nikos Mavrogiannopoulos [Thu, 29 Sep 2016 08:14:53 +0000 (10:14 +0200)]
This patch allows cmocka to be run under windows 64-bit

In that system while the maximum word size is 64-bits, the
'unsigned long int' type is only 32-bits.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
7 years agocpack: Ignore all object directories
Andreas Schneider [Wed, 21 Sep 2016 14:30:39 +0000 (16:30 +0200)]
cpack: Ignore all object directories

7 years agoBump version to 1.1.0
Andreas Schneider [Wed, 21 Sep 2016 13:54:41 +0000 (15:54 +0200)]
Bump version to 1.1.0

7 years agotests: Add test_groups test to validate xml output
David Schneider [Wed, 21 Sep 2016 13:20:09 +0000 (15:20 +0200)]
tests: Add test_groups test to validate xml output

This is for multiple groups in one test to make sure they do not create
invalid xml.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
7 years agocmocka: Do not add xml headers twice
Andreas Schneider [Wed, 21 Sep 2016 12:22:52 +0000 (14:22 +0200)]
cmocka: Do not add xml headers twice

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
7 years agocmocka: Add file pattern to create xml file for each group
Andreas Schneider [Wed, 21 Sep 2016 12:21:33 +0000 (14:21 +0200)]
cmocka: Add file pattern to create xml file for each group

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
7 years agoFixed format specifier width mismatch
Joseph Ates [Sun, 20 Dec 2015 21:29:09 +0000 (16:29 -0500)]
Fixed format specifier width mismatch

On some platforms PRIu64 is not necessarily the width of the
LargestIntegralType. A new decimal format specifier for
LargestIntegralType was added and replaces the invocations of PRIu64.

7 years agocmocka: Use defines for WILL_RETURN values
Andreas Schneider [Wed, 21 Sep 2016 09:21:28 +0000 (11:21 +0200)]
cmocka: Use defines for WILL_RETURN values

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
7 years agovcm_print_error: fix segfault on long messages
Aris Adamantiadis [Wed, 1 Jun 2016 18:50:38 +0000 (20:50 +0200)]
vcm_print_error: fix segfault on long messages

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmake: Fix possible issues with librt during configure
Andreas Schneider [Thu, 3 Mar 2016 08:12:21 +0000 (09:12 +0100)]
cmake: Fix possible issues with librt during configure

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmake: Add MinGW DLL Prefix Workaround
Joseph Ates [Sat, 23 Jan 2016 11:53:29 +0000 (06:53 -0500)]
cmake: Add MinGW DLL Prefix Workaround

CMake assigns "lib" as the prefix to shared libraries on MinGW
GCC, but MinGW does not expect such a prefix when linking to
DLLs. By setting, CMAKE_SHARED_LIBRARY_PREFIX to "" the
example tests were able to run with the exception of the
calculator_test which segfaults (SIGSEGV) on the setjmp in
test_divide_by_zero. This fault is specific to MinGW and does not
occur within runs on Cygwin or Visual Studio.

calculator_test was enabled only for static linking on MinGW

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmocka: Add VS2015 support
Joseph Ates [Sat, 23 Jan 2016 10:14:04 +0000 (05:14 -0500)]
cmocka: Add VS2015 support

Visual Studio now includes support for vsnprintf and snprintf but does
so as an inline functions. check_symbol_exists is used to check for
its existence within stdio. [3] All tests are passing when run from
within the IDE or via NMake. Command line builds via msbuild seem to
error for the first few example tests.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmocka: Add will_return_maybe() for ignoring mock returns
Joseph Ates [Wed, 10 Feb 2016 11:16:13 +0000 (12:16 +0100)]
cmocka: Add will_return_maybe() for ignoring mock returns

As both parameter and function call order checking allow for ignoring
cases where they are never invoked, the mock return values are at
somewhat of a mismatch in that they must always be returned at least
once (even in the case of will_return_always()). Therefore, the ability
to set the count to -2 on will_return_count was added with a new macro
(will_return_maybe) that indicates that that the value field may never
be returned and still allow a successful test.

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmocka: Fix indentation
Joseph Ates [Wed, 10 Feb 2016 11:16:17 +0000 (12:16 +0100)]
cmocka: Fix indentation

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmocka: Include strings.h for strcasecmp
Emil Velikov [Mon, 4 Jan 2016 14:25:22 +0000 (16:25 +0200)]
cmocka: Include strings.h for strcasecmp

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agotests: Add a group setup assert test
Andreas Schneider [Wed, 10 Feb 2016 11:00:36 +0000 (12:00 +0100)]
tests: Add a group setup assert test

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmocka: Print group setup and teardown errors
Andreas Schneider [Wed, 10 Feb 2016 10:57:11 +0000 (11:57 +0100)]
cmocka: Print group setup and teardown errors

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
8 years agotests: Add test for call ordering functionality
Joseph Ates [Thu, 12 Nov 2015 18:09:36 +0000 (13:09 -0500)]
tests: Add test for call ordering functionality

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmocka: Add support to verify call ordering
Joseph Ates [Thu, 12 Nov 2015 18:08:15 +0000 (13:08 -0500)]
cmocka: Add support to verify call ordering

8 years agoIgnore all build and obj* directores
Andreas Schneider [Wed, 28 Oct 2015 08:27:10 +0000 (09:27 +0100)]
Ignore all build and obj* directores

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
8 years agoINSTALL: Add Testing section
Andreas Schneider [Mon, 19 Oct 2015 16:15:05 +0000 (18:15 +0200)]
INSTALL: Add Testing section

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
8 years agoINSTALL: Add example for Windows
Andreas Schneider [Wed, 7 Oct 2015 14:42:32 +0000 (16:42 +0200)]
INSTALL: Add example for Windows

Looks like it isn't clear for some people reading that file that we
support Windows and MSVC ...

8 years agosrc: Fix some compiler warnings
Andreas Schneider [Mon, 5 Oct 2015 07:23:35 +0000 (09:23 +0200)]
src: Fix some compiler warnings

BUG: https://open.cryptomilk.org/issues/43

8 years agosrc: Use variable name for accessing the array elements
Andreas Schneider [Wed, 30 Sep 2015 11:07:08 +0000 (13:07 +0200)]
src: Use variable name for accessing the array elements

8 years agoinclude: Improve documentation for prestate macros
Andreas Schneider [Wed, 30 Sep 2015 10:43:06 +0000 (12:43 +0200)]
include: Improve documentation for prestate macros

8 years agocmocka: Allow to pass initial data to test cases
Pawel Szewczyk [Mon, 14 Sep 2015 10:52:12 +0000 (12:52 +0200)]
cmocka: Allow to pass initial data to test cases

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>
8 years agosrc: Simplify exception_handler()
Andreas Schneider [Mon, 14 Sep 2015 16:24:41 +0000 (18:24 +0200)]
src: Simplify exception_handler()

8 years agotest: update test_segfault_recovery to try multiple faults
Jonathon Reinhart [Tue, 8 Sep 2015 23:18:48 +0000 (19:18 -0400)]
test: update test_segfault_recovery to try multiple faults

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 years agoUse sigsetjmp()/siglongjmp() when available
Jonathon Reinhart [Tue, 8 Sep 2015 03:26:20 +0000 (23:26 -0400)]
Use sigsetjmp()/siglongjmp() when available

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>
8 years agosrc: Improve error reporting with cmocka default output
Andreas Schneider [Wed, 9 Sep 2015 08:16:51 +0000 (10:16 +0200)]
src: Improve error reporting with cmocka default output

Reviewed-by: Jakub Hrozek <jakub.hrozek@posteo.se>
8 years agosrc: Filter out invalid tests.
Andreas Schneider [Mon, 7 Sep 2015 07:40:46 +0000 (09:40 +0200)]
src: Filter out invalid tests.

8 years agoinclude: Protect config.h inclusion
Andreas Schneider [Tue, 4 Aug 2015 17:32:28 +0000 (19:32 +0200)]
include: Protect config.h inclusion

Thanks to Gregory Pakosz.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
8 years agoinclude: Add va_copy macro if MSVC doesn't provide it
Andreas Schneider [Sat, 1 Aug 2015 13:55:03 +0000 (15:55 +0200)]
include: Add va_copy macro if MSVC doesn't provide it

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
8 years agocmake: Fix warning on OSX
Andreas Schneider [Tue, 7 Jul 2015 09:07:01 +0000 (11:07 +0200)]
cmake: Fix warning on OSX

8 years agodef: Add missing cmocka_set_message_output symbol
Andreas Schneider [Tue, 7 Jul 2015 09:06:45 +0000 (11:06 +0200)]
def: Add missing cmocka_set_message_output symbol

8 years agocmocka: Print skipped tests in group summary
Pawel Szewczyk [Mon, 11 May 2015 11:34:29 +0000 (13:34 +0200)]
cmocka: Print skipped tests in group summary

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>
8 years agogitignor: Ignore all object file directories
Andreas Schneider [Mon, 11 May 2015 11:28:43 +0000 (13:28 +0200)]
gitignor: Ignore all object file directories

8 years agocmocka: Add subtests for groups using TAP output
Ellie Timoney [Mon, 11 May 2015 11:26:23 +0000 (13:26 +0200)]
cmocka: Add subtests for groups using TAP output

Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoBump version to 1.0.1
Andreas Schneider [Thu, 12 Mar 2015 11:56:06 +0000 (12:56 +0100)]
Bump version to 1.0.1

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoUpdate ChangeLog.
Andreas Schneider [Thu, 12 Mar 2015 11:55:49 +0000 (12:55 +0100)]
Update ChangeLog.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: realloc(ptr, 0) should act as free(ptr)
Niels de Vos [Thu, 26 Feb 2015 20:47:03 +0000 (21:47 +0100)]
cmocka: realloc(ptr, 0) should act as free(ptr)

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>
9 years agoFix function types in doxygen docs
Jakub Hrozek [Wed, 25 Feb 2015 08:09:35 +0000 (09:09 +0100)]
Fix function types in doxygen docs

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Use https to drop results.
Andreas Schneider [Fri, 20 Feb 2015 14:06:18 +0000 (15:06 +0100)]
cmake: Use https to drop results.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Add macro for assert_ptr_equal().
Andreas Schneider [Fri, 20 Feb 2015 08:48:36 +0000 (09:48 +0100)]
include: Add macro for assert_ptr_equal().

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Fix building with newer gcc versions.
Andreas Schneider [Fri, 20 Feb 2015 08:47:44 +0000 (09:47 +0100)]
include: Fix building with newer gcc versions.

__func__ is not a macro. We just need to define it on Windows for now.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocpack: Exclude object directories.
Andreas Schneider [Mon, 16 Feb 2015 14:22:38 +0000 (15:22 +0100)]
cpack: Exclude object directories.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoBump version to 1.0.0.
Andreas Schneider [Sun, 8 Feb 2015 12:49:51 +0000 (13:49 +0100)]
Bump version to 1.0.0.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoUpdate ChangeLog.
Andreas Schneider [Sat, 7 Feb 2015 17:07:32 +0000 (18:07 +0100)]
Update ChangeLog.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Use LargestIntegralType instead of uintmax_t
Andreas Schneider [Fri, 13 Feb 2015 12:36:52 +0000 (13:36 +0100)]
include: Use LargestIntegralType instead of uintmax_t

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Fix documentation for mock functions
Andreas Schneider [Fri, 13 Feb 2015 12:08:17 +0000 (13:08 +0100)]
include: Fix documentation for mock functions

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Disable some tests on Windows.
Andreas Schneider [Thu, 12 Feb 2015 18:44:39 +0000 (19:44 +0100)]
cmake: Disable some tests on Windows.

They work when executed manually but not with ctest.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoexamples: Use WILL_FAIL instead of regular expression
Andreas Schneider [Thu, 12 Feb 2015 18:17:46 +0000 (19:17 +0100)]
examples: Use WILL_FAIL instead of regular expression

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Fix running examples on Windows.
Andreas Schneider [Thu, 12 Feb 2015 17:34:17 +0000 (18:34 +0100)]
cmake: Fix running examples on Windows.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agotests: Use a different regex for segfault on Windows
Jakub Hrozek [Thu, 12 Feb 2015 17:05:16 +0000 (18:05 +0100)]
tests: Use a different regex for segfault on Windows

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
9 years agocmocka: examples: Fix assert macros usage
Krzysztof Opasiak [Thu, 12 Feb 2015 13:11:41 +0000 (14:11 +0100)]
cmocka: examples: Fix assert macros usage

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>
9 years agocmocka: Surround include info with code endcode
Krzysztof Opasiak [Thu, 12 Feb 2015 13:11:37 +0000 (14:11 +0100)]
cmocka: Surround include info with code endcode

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>
9 years agocmocka: Include cmocka_private.h after cmocka.h
Jakub Hrozek [Thu, 12 Feb 2015 16:10:21 +0000 (17:10 +0100)]
cmocka: Include cmocka_private.h after cmocka.h

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

9 years agocmake: Always set correct output name.
Andreas Schneider [Thu, 12 Feb 2015 16:05:39 +0000 (17:05 +0100)]
cmake: Always set correct output name.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Correctly include signal.h
Andreas Schneider [Thu, 12 Feb 2015 16:00:34 +0000 (17:00 +0100)]
include: Correctly include signal.h

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Fix executing test examples on Windows.
Andreas Schneider [Thu, 12 Feb 2015 08:14:10 +0000 (09:14 +0100)]
cmake: Fix executing test examples on Windows.

The executable need the path to dll set so they can be run successfully.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Build tests with the static library.
Andreas Schneider [Thu, 12 Feb 2015 08:03:16 +0000 (09:03 +0100)]
cmake: Build tests with the static library.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Fix warning for missing __WORDSIZE
Andreas Schneider [Thu, 12 Feb 2015 08:00:17 +0000 (09:00 +0100)]
include: Fix warning for missing __WORDSIZE

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agotests: Add io.h for open() and close() on Windows.
Andreas Schneider [Wed, 11 Feb 2015 17:13:55 +0000 (18:13 +0100)]
tests: Add io.h for open() and close() on Windows.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Do not set gcc flags in VC.
Andreas Schneider [Wed, 11 Feb 2015 17:09:55 +0000 (18:09 +0100)]
cmake: Do not set gcc flags in VC.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agotests: Fix test_assert_macros* with Visual Studio.
Andreas Schneider [Wed, 11 Feb 2015 17:00:11 +0000 (18:00 +0100)]
tests: Fix test_assert_macros* with Visual Studio.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agotests: Fix building the tests with Visual Studio.
Andreas Schneider [Wed, 11 Feb 2015 16:57:28 +0000 (17:57 +0100)]
tests: Fix building the tests with Visual Studio.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoconfig: Add missing define for (v)snprintf functions.
Andreas Schneider [Wed, 11 Feb 2015 16:44:37 +0000 (17:44 +0100)]
config: Add missing define for (v)snprintf functions.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Fix a typo in the options
Andreas Schneider [Wed, 11 Feb 2015 16:36:10 +0000 (17:36 +0100)]
cmake: Fix a typo in the options

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Cast correctly to errno type
Andreas Schneider [Wed, 11 Feb 2015 10:20:08 +0000 (11:20 +0100)]
cmocka: Cast correctly to errno type

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Add missing functions for Visual Studio.
Andreas Schneider [Wed, 11 Feb 2015 10:19:40 +0000 (11:19 +0100)]
include: Add missing functions for Visual Studio.

Move the ugly stuff to cmocka_private.h.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agodef: Export missing symbols on Windows.
Andreas Schneider [Wed, 11 Feb 2015 10:19:10 +0000 (11:19 +0100)]
def: Export missing symbols on Windows.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Fix possible test state issues
Andreas Schneider [Wed, 11 Feb 2015 07:21:43 +0000 (08:21 +0100)]
cmocka: Fix possible test state issues

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Define __WORDSIZE if needed.
Andreas Schneider [Wed, 11 Feb 2015 07:10:07 +0000 (08:10 +0100)]
include: Define __WORDSIZE if needed.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Fix pointer casting and add check_expected_ptr()
Andreas Schneider [Wed, 11 Feb 2015 06:55:47 +0000 (07:55 +0100)]
include: Fix pointer casting and add check_expected_ptr()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Fix a double free in cmprintf_tap()
Andreas Schneider [Tue, 10 Feb 2015 14:36:13 +0000 (15:36 +0100)]
cmocka: Fix a double free in cmprintf_tap()

CID: #1268622

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Initialize group_state in _cmocka_run_group_tests()
Andreas Schneider [Tue, 10 Feb 2015 14:34:23 +0000 (15:34 +0100)]
cmocka: Initialize group_state in _cmocka_run_group_tests()

CID: #1268623

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmake: Turn off deprecated warning for test_cmockery.c
Andreas Schneider [Tue, 10 Feb 2015 14:05:37 +0000 (15:05 +0100)]
cmake: Turn off deprecated warning for test_cmockery.c

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agoinclude: Define fix defintion of LargestIntegralType
Andreas Schneider [Tue, 10 Feb 2015 09:59:15 +0000 (10:59 +0100)]
include: Define fix defintion of LargestIntegralType

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Fix printf integer formats.
Andreas Schneider [Tue, 10 Feb 2015 09:53:32 +0000 (10:53 +0100)]
cmocka: Fix printf integer formats.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Add printf attribute checking for vcm_print_error()
Andreas Schneider [Tue, 10 Feb 2015 07:11:30 +0000 (08:11 +0100)]
cmocka: Add printf attribute checking for vcm_print_error()

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Check if 'struct timespec' is available.
Andreas Schneider [Mon, 9 Feb 2015 12:39:57 +0000 (13:39 +0100)]
cmocka: Check if 'struct timespec' is available.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Only handle SIGBUS and SIGSYS if the system supports it.
Andreas Schneider [Mon, 9 Feb 2015 13:42:34 +0000 (14:42 +0100)]
cmocka: Only handle SIGBUS and SIGSYS if the system supports it.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agocmocka: Fix length calculation.
Andreas Schneider [Tue, 10 Feb 2015 07:07:16 +0000 (08:07 +0100)]
cmocka: Fix length calculation.

CID: #1268624

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
SQ

9 years agocmocka: Allow include of cmocka_platform.h
Andreas Schneider [Tue, 10 Feb 2015 07:23:25 +0000 (08:23 +0100)]
cmocka: Allow include of cmocka_platform.h

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
9 years agotests: Add message output format tests
Jakub Hrozek [Mon, 9 Feb 2015 22:44:59 +0000 (23:44 +0100)]
tests: Add message output format tests

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
9 years agocmocka: Add a newline to subunit error output
Jakub Hrozek [Tue, 10 Feb 2015 10:12:00 +0000 (11:12 +0100)]
cmocka: Add a newline to subunit error output

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>
9 years agocmocka: Print test errors directly to make them included in the XML output
Jakub Hrozek [Tue, 10 Feb 2015 12:03:03 +0000 (13:03 +0100)]
cmocka: Print test errors directly to make them included in the XML output

Signed-off-by: Jakub Hrozek <jakub.hrozek@posteo.se>