Add service load test.
[oweals/dinit.git] / src / tests / Makefile
index 05d2a2d3cfa0803094f2ae400b2d104e3db514f7..f713af7b9b56aeb92db96178b98c804672f6214a 100644 (file)
@@ -1,13 +1,14 @@
 -include ../../mconfig
 
-objects = tests.o test-dinit.o proctests.o test-run-child-proc.o test-bpsys.o
-parent_objs = service.o proc-service.o dinit-log.o load_service.o baseproc-service.o
+objects = tests.o test-dinit.o proctests.o loadtests.o test-run-child-proc.o test-bpsys.o
+parent_objs = service.o proc-service.o dinit-log.o load-service.o baseproc-service.o
 
 check: build-tests
        ./tests
        ./proctests
+       ./loadtests
 
-build-tests: tests proctests
+build-tests: tests proctests loadtests
 
 # Create an "includes" directory populated with a combination of real and mock headers:
 prepare-incdir:
@@ -17,10 +18,13 @@ prepare-incdir:
        cd includes; ln -sf ../test-includes/*.h .
 
 tests: prepare-incdir $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o
-       $(CXX) $(SANITIZEOPTS) -o tests $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(EXTRA_LIBS)
+       $(CXX) $(SANITIZEOPTS) -o tests $(parent_objs) tests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(LDFLAGS)
 
 proctests: prepare-incdir $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o
-       $(CXX) $(SANITIZEOPTS) -o proctests $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(EXTRA_LIBS)
+       $(CXX) $(SANITIZEOPTS) -o proctests $(parent_objs) proctests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(LDFLAGS)
+       
+loadtests: prepare-incdir $(parent_objs) loadtests.o test-dinit.o test-bpsys.o test-run-child-proc.o
+       $(CXX) $(SANITIZEOPTS) -o loadtests $(parent_objs) loadtests.o test-dinit.o test-bpsys.o test-run-child-proc.o $(LDFLAGS)
 
 $(objects): %.o: %.cc
        $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -MMD -MP -Iincludes -I../dasynq -c $< -o $@
@@ -32,3 +36,4 @@ clean:
        rm -f *.o *.d
 
 -include $(objects:.o=.d)
+-include $(parent_objs:.o=.d)