2007-03-22 10:30:00 -07:00
|
|
|
#
|
2012-05-21 04:12:37 -07:00
|
|
|
# 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/.
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-08-04 11:26:44 -07:00
|
|
|
DEPTH = @DEPTH@
|
2007-03-22 10:30:00 -07:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
|
|
|
VPATH = @srcdir@
|
2012-08-04 11:26:44 -07:00
|
|
|
relativesrcdir = @relativesrcdir@
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
|
|
|
MODULE = xpcom
|
2012-10-19 16:21:02 -07:00
|
|
|
FAIL_ON_WARNINGS = 1
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2012-02-22 15:05:28 -08:00
|
|
|
DIRS = \
|
|
|
|
external \
|
|
|
|
component \
|
|
|
|
bug656331_component \
|
|
|
|
component_no_aslr \
|
|
|
|
$(NULL)
|
2010-06-10 09:51:43 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
DIRS += windows
|
|
|
|
endif
|
|
|
|
|
2008-02-27 08:28:13 -08:00
|
|
|
ifdef DEHYDRA_PATH
|
|
|
|
DIRS += static-checker
|
|
|
|
endif
|
|
|
|
|
2011-04-15 02:03:17 -07:00
|
|
|
VPATH += $(topsrcdir)/build
|
|
|
|
|
|
|
|
CPPSRCS = \
|
|
|
|
nsIFileEnumerator.cpp \
|
|
|
|
TestCallTemplates.cpp \
|
|
|
|
TestINIParser.cpp \
|
|
|
|
TestRacingServiceManager.cpp \
|
|
|
|
TestRegistrationOrder.cpp \
|
|
|
|
TestThreadPoolListener.cpp \
|
|
|
|
TestTimers.cpp \
|
|
|
|
TestBlockingProcess.cpp \
|
|
|
|
TestQuickReturn.cpp \
|
|
|
|
TestArguments.cpp \
|
|
|
|
TestUnicodeArguments.cpp \
|
|
|
|
$(STDCPPFLAGS) \
|
|
|
|
$(NULL)
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2011-06-08 12:52:42 -07:00
|
|
|
ifeq ($(OS_TARGET),WINNT)
|
|
|
|
CPPSRCS += TestBase64.cpp
|
|
|
|
endif
|
|
|
|
|
2010-04-02 10:58:12 -07:00
|
|
|
ifdef WRAP_STL_INCLUDES
|
|
|
|
CPPSRCS += TestSTLWrappers.cpp
|
|
|
|
endif
|
|
|
|
|
2008-12-03 22:25:00 -08:00
|
|
|
SIMPLE_PROGRAMS := $(CPPSRCS:.cpp=$(BIN_SUFFIX))
|
|
|
|
|
|
|
|
CPP_UNIT_TESTS = \
|
2010-05-14 12:05:14 -07:00
|
|
|
ShowAlignments.cpp \
|
2009-12-13 19:40:55 -08:00
|
|
|
ShowSSEConfig.cpp \
|
2008-12-03 22:25:00 -08:00
|
|
|
TestAutoPtr.cpp \
|
2012-07-09 09:19:59 -07:00
|
|
|
TestAutoRef.cpp \
|
2010-03-15 04:38:50 -07:00
|
|
|
TestCOMArray.cpp \
|
2008-12-03 22:25:00 -08:00
|
|
|
TestCOMPtr.cpp \
|
|
|
|
TestCOMPtrEq.cpp \
|
2012-01-19 10:29:38 -08:00
|
|
|
TestDeque.cpp \
|
2009-03-23 17:44:37 -07:00
|
|
|
TestFile.cpp \
|
2008-12-03 22:25:00 -08:00
|
|
|
TestHashtables.cpp \
|
|
|
|
TestID.cpp \
|
2009-06-09 21:13:36 -07:00
|
|
|
TestObserverArray.cpp \
|
2008-12-03 22:25:00 -08:00
|
|
|
TestObserverService.cpp \
|
|
|
|
TestPipe.cpp \
|
2010-04-25 04:06:42 -07:00
|
|
|
TestRefPtr.cpp \
|
2012-05-08 11:28:59 -07:00
|
|
|
TestSettingsAPI.cpp \
|
2008-12-03 22:25:00 -08:00
|
|
|
TestTextFormatter.cpp \
|
2011-09-22 08:22:20 -07:00
|
|
|
TestTArray.cpp \
|
2008-12-03 22:25:00 -08:00
|
|
|
$(NULL)
|
|
|
|
|
2011-11-03 20:53:41 -07:00
|
|
|
ifdef MOZ_MEMORY
|
|
|
|
CPP_UNIT_TESTS += TestJemalloc.cpp
|
|
|
|
endif
|
|
|
|
|
2011-05-23 09:54:47 -07:00
|
|
|
# XXX Make this tests work in libxul builds.
|
|
|
|
#CPP_UNIT_TESTS += \
|
|
|
|
# TestArray.cpp \
|
|
|
|
# TestCRT.cpp \
|
|
|
|
# TestEncoding.cpp \
|
|
|
|
# TestExpirationTracker.cpp \
|
|
|
|
# TestPipes.cpp \
|
|
|
|
# TestPriorityQueue.cpp \
|
|
|
|
# TestStorageStream.cpp \
|
|
|
|
# TestStrings.cpp \
|
|
|
|
# TestSynchronization.cpp \
|
|
|
|
# TestTArray.cpp \
|
|
|
|
# TestThreadPool.cpp \
|
|
|
|
# TestThreads.cpp \
|
|
|
|
# TestTimeStamp.cpp \
|
|
|
|
# TestXPIDLString.cpp \
|
|
|
|
# TestUTF.cpp \
|
|
|
|
# TestAtoms.cpp \
|
|
|
|
# $(NULL)
|
|
|
|
## FIXME: bug 577500 TestStaticAtoms fails when run in dist/bin
|
|
|
|
## TestStaticAtoms.cpp
|
2009-05-04 21:57:15 -07:00
|
|
|
|
|
|
|
ifdef MOZ_DEBUG
|
2009-10-20 10:57:48 -07:00
|
|
|
# FIXME bug 523392: TestDeadlockDetector doesn't like Windows
|
|
|
|
# FIXME bug 523378: also fails on OS X
|
2011-05-01 11:59:24 -07:00
|
|
|
ifneq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
|
2009-05-04 21:57:15 -07:00
|
|
|
CPP_UNIT_TESTS += \
|
|
|
|
TestDeadlockDetector.cpp \
|
|
|
|
TestDeadlockDetectorScalability.cpp \
|
2008-12-03 22:25:00 -08:00
|
|
|
$(NULL)
|
2008-07-12 14:27:27 -07:00
|
|
|
endif
|
2009-05-04 21:57:15 -07:00
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2008-12-03 22:25:00 -08:00
|
|
|
ifndef MOZILLA_INTERNAL_API
|
|
|
|
CPP_UNIT_TESTS += \
|
|
|
|
TestStringAPI.cpp \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2008-07-12 14:32:25 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2008-12-04 01:13:14 -08:00
|
|
|
LIBS += $(XPCOM_LIBS)
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
# Needed to resolve __yylex (?)
|
|
|
|
ifeq ($(OS_ARCH)$(OS_RELEASE),FreeBSD2)
|
|
|
|
LIBS += -lpcap
|
|
|
|
endif
|
|
|
|
|
|
|
|
XPCSHELL_TESTS = unit
|
|
|
|
|
2008-08-11 17:01:47 -07:00
|
|
|
# Make sure we have symbols in case we need to debug these.
|
|
|
|
MOZ_DEBUG_SYMBOLS = 1
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
|
|
|
LOCAL_INCLUDES = \
|
|
|
|
-I$(srcdir)/../ds \
|
|
|
|
$(NULL)
|
|
|
|
|
|
|
|
libs::
|
|
|
|
$(INSTALL) $(srcdir)/test.properties $(DIST)/bin/res
|
2011-04-14 02:23:13 -07:00
|
|
|
ifneq (,$(SIMPLE_PROGRAMS))
|
2010-08-26 14:47:28 -07:00
|
|
|
$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
|
2011-04-14 02:23:13 -07:00
|
|
|
endif
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2008-12-03 22:25:00 -08:00
|
|
|
# Copy TestHarness.h into its own module, for ease of setting up includes
|
|
|
|
# correctly.
|
|
|
|
export::
|
|
|
|
$(NSINSTALL) -D $(DIST)/include/testing
|
|
|
|
$(INSTALL) $(srcdir)/TestHarness.h $(DIST)/include/testing
|
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
install::
|
|
|
|
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/test.properties $(DESTDIR)$(mozappdir)/res
|
|
|
|
|
2011-05-01 11:59:24 -07:00
|
|
|
ifeq (,$(filter-out WINNT os2-emx, $(HOST_OS_ARCH)))
|
2012-07-25 10:06:12 -07:00
|
|
|
getnativepath = $(call normalizepath,$(1))
|
2008-04-01 06:06:18 -07:00
|
|
|
else
|
|
|
|
getnativepath = $(1)
|
|
|
|
endif
|
|
|
|
|
2012-05-07 15:21:11 -07:00
|
|
|
abs_srcdir = $(call core_abspath,$(srcdir))
|
2008-04-10 09:14:01 -07:00
|
|
|
|
2010-03-10 10:36:45 -08:00
|
|
|
DIST_PATH = $(DIST)/bin/
|
|
|
|
RM_DIST = rm -f
|
|
|
|
regOrderDir="$(call getnativepath,$(abs_srcdir)/regorder)";
|
|
|
|
DOCOPY=
|
2011-05-01 11:59:24 -07:00
|
|
|
|
2007-03-22 10:30:00 -07:00
|
|
|
check::
|
2008-04-01 06:06:18 -07:00
|
|
|
XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) \
|
2010-03-10 10:36:45 -08:00
|
|
|
$(DIST)/bin/TestRegistrationOrder$(BIN_SUFFIX) $(regOrderDir)
|
2010-03-03 07:25:14 -08:00
|
|
|
|
|
|
|
GARBAGE += TestScriptable.h
|