tests: add control protocol test (unload).
[oweals/dinit.git] / src / tests / Makefile
index 2e4395b785c66f54272a3b728a66890e2af8cf7b..4029efe6a1324190c74f870c460815c81f2013ed 100644 (file)
@@ -3,12 +3,16 @@
 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
+check: build-tests run-tests
+
+build-tests: prepare-incdir tests proctests loadtests
+       $(MAKE) -C cptests build-tests
+
+run-tests: tests proctests loadtests
        ./tests
        ./proctests
        ./loadtests
-
-build-tests: prepare-incdir tests proctests loadtests
+       $(MAKE) -C cptests run-tests
 
 # Create an "includes" directory populated with a combination of real and mock headers:
 prepare-incdir:
@@ -33,7 +37,8 @@ $(parent_objs): %.o: ../%.cc
        $(CXX) $(CXXOPTS) $(SANITIZEOPTS) -MMD -MP -Iincludes -I../dasynq -c $< -o $@
 
 clean:
-       rm -f *.o *.d
+       $(MAKE) -C cptests clean
+       rm -f *.o *.d tests proctests loadtests
 
 -include $(objects:.o=.d)
 -include $(parent_objs:.o=.d)