From cbd73e0e20931d2e4d614c336efacf69ff7129f3 Mon Sep 17 00:00:00 2001 From: Davin McCall Date: Thu, 11 Jan 2018 22:17:54 +0000 Subject: [PATCH] Tests: use stubs for various functions. --- src/tests/Makefile | 6 +++--- src/tests/test-dinit.cc | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 src/tests/test-dinit.cc 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 +{ +} -- 2.25.1