Stub out system functions for testing (WIP).
authorDavin McCall <davmac@davmac.org>
Sun, 14 Jan 2018 23:34:21 +0000 (23:34 +0000)
committerDavin McCall <davmac@davmac.org>
Sun, 14 Jan 2018 23:34:21 +0000 (23:34 +0000)
commit370fc509d9e9c8b47c216fd9de917911597a4541
treef1eb2e8396bb2af36a02a722b68f76f608706c18
parentca29440519e29373fb529e049acd1aee3ececf6c
Stub out system functions for testing (WIP).

This is a more thorough and should be an overall better approach than
stubbing/mocking the base_proc_service class itself.

This commit introduces a baseproc-sys.h header which holds aliases for
the system functions that are used (kill, fcntl, etc). When running
tests the functions will be mocked (currently they are rigged to abort
when called).
src/baseproc-service.cc
src/includes/baseproc-sys.h [new file with mode: 0644]
src/tests/Makefile
src/tests/test-baseproc.cc [deleted file]
src/tests/test-includes/baseproc-sys.h [new file with mode: 0644]
src/tests/test-run-child-proc.cc [new file with mode: 0644]