]> git.ipfire.org Git - thirdparty/libcgroup.git/commit
tests: Add STATIC and UNIT_TEST definitions to automake files
authorTom Hromatka <tom.hromatka@oracle.com>
Mon, 4 Nov 2019 23:14:16 +0000 (23:14 +0000)
committerTom Hromatka <tom.hromatka@oracle.com>
Thu, 12 Dec 2019 22:10:28 +0000 (15:10 -0700)
commitf1c0eea36fe93c9b9144bfacf2b045d247fec29f
tree445147ce7bf56986307ca754a5ffe1434103df9c
parentc72b8aa4ce77f192969b1539490e138f7f15139d
tests: Add STATIC and UNIT_TEST definitions to automake files

This commit adds two new definitions to the automake Makefile.am
files.  This change has no effect on the deliverable binaries.

STATIC - For a standard libcgroup library build, STATIC is equal
         to the "static" keyword and behaves exactly the same.
         For a unit test build, STATIC is mapped to an empty
         string.  This allows the unit tests to invoke static
         functions that would otherwise be unavailable to the
         test suite.

UNIT_TEST - This define is used in libcgroup-internal.h to
         wrap the function prototypes of STATIC functions.
         In a standard libcgroup library build, UNIT_TEST
         is _not_ defined, and thus the prototypes are not
         available.  In a unit test build, UNIT_TEST is
         defined and the function prototypes are available
         for the unit tests to use.

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/Makefile.am
src/libcgroup-internal.h
tests/gunit/Makefile.am