all:
$(MAKE) -C src all
+check:
+ $(MAKE) -C src check
+
install:
$(MAKE) -C src install
$(MAKE) -C doc/manpages install
$(objects): %.o: %.cc
$(CXX) $(CXXOPTS) -Idasynq -c $< -o $@
+check: $(objects)
+ $(MAKE) -C tests check
+
install: all
install -d $(DESTDIR)/sbin
install -s dinit dinitctl $(SHUTDOWN) $(DESTDIR)/sbin
endif
clean:
- rm -f *.o
+ rm -f *.o *.d
rm -f dinit dinitctl shutdown
+ $(MAKE) -C tests clean
$(objects:.o=.d): %.d: %.cc
$(CXX) $(CXXOPTS) -Idasynq -MM -MG -MF $@ $<
objects = tests.o
parent_objs = ../service.o ../control.o ../dinit-log.o ../load_service.o ../dinit.o
+check: build-tests
+ ./tests
+
build-tests: tests
tests: $(objects)
$(CXX) $(CXXOPTS) -I.. -I../dasynq -c $< -o $@
clean:
- rm -f *.o
+ rm -f *.o *.d
$(objects:.o=.d): %.d: %.cc
$(CXX) $(CXXOPTS) -I.. -I../dasynq -MM -MG -MF $@ $<
#include <cassert>
+#include <iostream>
+
#include "service.h"
void test1()
int main(int argc, char **argv)
{
+ std::cout << "test1... ";
test1();
+ std::cout << "PASSED" << std::endl;
+
+ std::cout << "test2... ";
test2();
+ std::cout << "PASSED" << std::endl;
}