From: Davin McCall Date: Thu, 11 Jan 2018 22:17:54 +0000 (+0000) Subject: Tests: use stubs for various functions. X-Git-Tag: v0.08~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cbd73e0e20931d2e4d614c336efacf69ff7129f3;p=oweals%2Fdinit.git Tests: use stubs for various functions. --- diff --git a/src/tests/Makefile b/src/tests/Makefile index 7ebdd54..26a9eef 100644 --- a/src/tests/Makefile +++ b/src/tests/Makefile @@ -1,7 +1,7 @@ -include ../../mconfig -objects = tests.o -parent_objs = service.o baseproc-service.o proc-service.o control.o dinit-log.o load_service.o dinit.o +objects = tests.o test-dinit.o +parent_objs = service.o baseproc-service.o proc-service.o control.o dinit-log.o load_service.o # dinit.o check: build-tests ./tests @@ -9,7 +9,7 @@ check: build-tests build-tests: tests tests: $(objects) $(parent_objs) - $(CXX) $(SANITIZEOPTS) -o tests tests.o $(parent_objs) $(EXTRA_LIBS) + $(CXX) $(SANITIZEOPTS) -o tests $(objects) $(parent_objs) $(EXTRA_LIBS) $(objects): %.o: %.cc $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -I.. -I../dasynq -c $< -o $@ diff --git a/src/tests/test-dinit.cc b/src/tests/test-dinit.cc new file mode 100644 index 0000000..9b6ca7a --- /dev/null +++ b/src/tests/test-dinit.cc @@ -0,0 +1,15 @@ +#include "dasynq.h" + +using eventloop_t = dasynq::event_loop; + +eventloop_t event_loop; + +int active_control_conns = 0; + +void open_control_socket(bool report_ro_failure) noexcept +{ +} + +void setup_external_log() noexcept +{ +}