# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. DEPTH = @DEPTH@ topsrcdir = @top_srcdir@ srcdir = @srcdir@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk TOOL_DIRS += app MODULE = ipdlunittest EXPORTS_NAMESPACES = mozilla/_ipdltest EXPORTS_mozilla/_ipdltest = \ IPDLUnitTests.h \ IPDLUnitTestProcessChild.h \ IPDLUnitTestTypes.h \ $(NULL) LIBRARY_NAME = $(MODULE)_s LIBXUL_LIBRARY = 1 FORCE_STATIC_LIB = 1 EXPORT_LIBRARY = 1 IPDLTESTS = \ TestBlockChild \ TestBridgeMain \ TestCrashCleanup \ TestDataStructures \ TestDesc \ TestFailedCtor \ TestHangs \ TestJSON \ TestLatency \ TestManyChildAllocs \ TestMultiMgrs \ TestNestedLoops \ TestOpens \ TestRPCErrorCleanup \ TestRPCRaces \ TestRPCShutdownRace \ TestRaceDeferral \ TestRacyReentry \ TestRacyRPCReplies \ TestRacyUndefer \ TestSanity \ TestSelfManageRoot \ TestShmem \ TestShutdown \ TestStackHooks \ TestSyncError \ TestSyncHang \ TestSyncWakeup \ TestBadActor \ $(NULL) ifeq ($(OS_ARCH),Linux) IPDLTESTS += TestSysVShmem endif EXTRA_PROTOCOLS = \ TestBridgeSub \ $(NULL) IPDLTESTSRCS = $(addsuffix .cpp,$(IPDLTESTS)) IPDLTESTHDRS = $(addprefix $(srcdir)/,$(addsuffix .h,$(IPDLTESTS))) TESTER_TEMPLATE := $(srcdir)/IPDLUnitTests.template.cpp GENTESTER := $(srcdir)/genIPDLUnitTests.py CPPSRCS = \ IPDLUnitTests.cpp \ IPDLUnitTestSubprocess.cpp \ IPDLUnitTestProcessChild.cpp \ $(IPDLTESTSRCS) \ $(NULL) include $(topsrcdir)/config/config.mk include $(topsrcdir)/ipc/chromium/chromium-config.mk include $(topsrcdir)/config/rules.mk IPDLUNITTEST_BIN = $(DEPTH)/dist/bin/ipdlunittest$(BIN_SUFFIX) IPDLUnitTests.cpp : Makefile.in $(GENTESTER) $(TESTER_TEMPLATE) $(IPDLTESTHDRS) $(PYTHON) $(GENTESTER) $(TESTER_TEMPLATE) -t $(IPDLTESTS) -e $(EXTRA_PROTOCOLS) > $@ check-proc:: @$(EXIT_ON_ERROR) \ for test in $(IPDLTESTS); do \ $(RUN_TEST_PROGRAM) $(IPDLUNITTEST_BIN) $$test ; \ done check-thread:: @$(EXIT_ON_ERROR) \ for test in $(IPDLTESTS); do \ $(RUN_TEST_PROGRAM) $(IPDLUNITTEST_BIN) thread:$$test ; \ done check:: check-proc check-thread check-valgrind:: @$(EXIT_ON_ERROR) \ for test in $(IPDLTESTS); do \ $(RUN_TEST_PROGRAM) -g -d \ valgrind -a '--leak-check=full --trace-children=yes -q' \ $(IPDLUNITTEST_BIN) $$test ; \ done