1998-08-20 00:42:14 +04:00
|
|
|
#
|
2012-05-21 15:12:37 +04: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/.
|
1998-08-20 00:42:14 +04:00
|
|
|
|
1998-10-21 06:13:56 +04:00
|
|
|
DEPTH = ../..
|
1998-08-20 00:42:14 +04:00
|
|
|
topsrcdir = @top_srcdir@
|
|
|
|
srcdir = @srcdir@
|
1998-10-21 06:13:56 +04:00
|
|
|
VPATH = @srcdir@
|
2010-08-27 01:47:28 +04:00
|
|
|
relativesrcdir = xpcom/tests
|
1998-08-20 00:42:14 +04:00
|
|
|
|
|
|
|
include $(DEPTH)/config/autoconf.mk
|
|
|
|
|
2000-11-20 10:16:06 +03:00
|
|
|
MODULE = xpcom
|
2005-11-08 21:17:49 +03:00
|
|
|
|
2012-02-23 03:05:28 +04:00
|
|
|
DIRS = \
|
|
|
|
external \
|
|
|
|
component \
|
|
|
|
bug656331_component \
|
|
|
|
component_no_aslr \
|
|
|
|
$(NULL)
|
2010-06-10 20:51:43 +04:00
|
|
|
|
2001-12-09 10:05:12 +03:00
|
|
|
ifeq ($(OS_ARCH),WINNT)
|
|
|
|
DIRS += windows
|
|
|
|
endif
|
|
|
|
|
2008-02-27 19:28:13 +03:00
|
|
|
ifdef DEHYDRA_PATH
|
|
|
|
DIRS += static-checker
|
|
|
|
endif
|
|
|
|
|
2011-04-15 13:03:17 +04: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)
|
2005-11-08 21:17:49 +03:00
|
|
|
|
2011-06-08 23:52:42 +04:00
|
|
|
ifeq ($(OS_TARGET),WINNT)
|
|
|
|
CPPSRCS += TestBase64.cpp
|
|
|
|
endif
|
|
|
|
|
2010-04-02 21:58:12 +04:00
|
|
|
ifdef WRAP_STL_INCLUDES
|
|
|
|
CPPSRCS += TestSTLWrappers.cpp
|
|
|
|
endif
|
|
|
|
|
2008-12-04 09:25:00 +03:00
|
|
|
SIMPLE_PROGRAMS := $(CPPSRCS:.cpp=$(BIN_SUFFIX))
|
|
|
|
|
|
|
|
CPP_UNIT_TESTS = \
|
2010-05-14 23:05:14 +04:00
|
|
|
ShowAlignments.cpp \
|
2009-12-14 06:40:55 +03:00
|
|
|
ShowSSEConfig.cpp \
|
2008-12-04 09:25:00 +03:00
|
|
|
TestAutoPtr.cpp \
|
2012-07-09 20:19:59 +04:00
|
|
|
TestAutoRef.cpp \
|
2012-03-01 06:40:47 +04:00
|
|
|
TestBloomFilter.cpp \
|
2010-03-15 14:38:50 +03:00
|
|
|
TestCOMArray.cpp \
|
2008-12-04 09:25:00 +03:00
|
|
|
TestCOMPtr.cpp \
|
|
|
|
TestCOMPtrEq.cpp \
|
2012-01-19 22:29:38 +04:00
|
|
|
TestDeque.cpp \
|
2009-03-24 03:44:37 +03:00
|
|
|
TestFile.cpp \
|
2008-12-04 09:25:00 +03:00
|
|
|
TestHashtables.cpp \
|
|
|
|
TestID.cpp \
|
2009-06-10 08:13:36 +04:00
|
|
|
TestObserverArray.cpp \
|
2008-12-04 09:25:00 +03:00
|
|
|
TestObserverService.cpp \
|
|
|
|
TestPipe.cpp \
|
2010-04-25 15:06:42 +04:00
|
|
|
TestRefPtr.cpp \
|
2012-05-08 22:28:59 +04:00
|
|
|
TestSettingsAPI.cpp \
|
2008-12-04 09:25:00 +03:00
|
|
|
TestTextFormatter.cpp \
|
2011-09-22 19:22:20 +04:00
|
|
|
TestTArray.cpp \
|
2008-12-04 09:25:00 +03:00
|
|
|
$(NULL)
|
|
|
|
|
2011-11-04 07:53:41 +04:00
|
|
|
ifdef MOZ_MEMORY
|
|
|
|
CPP_UNIT_TESTS += TestJemalloc.cpp
|
|
|
|
endif
|
|
|
|
|
2011-05-23 20:54:47 +04: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-05 08:57:15 +04:00
|
|
|
|
|
|
|
ifdef MOZ_DEBUG
|
2009-10-20 21:57:48 +04:00
|
|
|
# FIXME bug 523392: TestDeadlockDetector doesn't like Windows
|
|
|
|
# FIXME bug 523378: also fails on OS X
|
2011-05-01 22:59:24 +04:00
|
|
|
ifneq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
|
2009-05-05 08:57:15 +04:00
|
|
|
CPP_UNIT_TESTS += \
|
|
|
|
TestDeadlockDetector.cpp \
|
|
|
|
TestDeadlockDetectorScalability.cpp \
|
2008-12-04 09:25:00 +03:00
|
|
|
$(NULL)
|
2008-07-13 01:27:27 +04:00
|
|
|
endif
|
2009-05-05 08:57:15 +04:00
|
|
|
endif
|
1999-07-23 03:20:25 +04:00
|
|
|
|
2008-12-04 09:25:00 +03:00
|
|
|
ifndef MOZILLA_INTERNAL_API
|
|
|
|
CPP_UNIT_TESTS += \
|
|
|
|
TestStringAPI.cpp \
|
|
|
|
$(NULL)
|
|
|
|
endif
|
2008-07-13 01:32:25 +04:00
|
|
|
|
1999-12-21 04:39:12 +03:00
|
|
|
include $(topsrcdir)/config/config.mk
|
|
|
|
|
2008-12-04 12:13:14 +03:00
|
|
|
LIBS += $(XPCOM_LIBS)
|
|
|
|
|
1999-06-09 12:43:51 +04:00
|
|
|
# Needed to resolve __yylex (?)
|
|
|
|
ifeq ($(OS_ARCH)$(OS_RELEASE),FreeBSD2)
|
|
|
|
LIBS += -lpcap
|
|
|
|
endif
|
|
|
|
|
2007-01-31 06:25:46 +03:00
|
|
|
XPCSHELL_TESTS = unit
|
|
|
|
|
2008-08-12 04:01:47 +04:00
|
|
|
# Make sure we have symbols in case we need to debug these.
|
|
|
|
MOZ_DEBUG_SYMBOLS = 1
|
|
|
|
|
1999-07-23 03:20:25 +04:00
|
|
|
include $(topsrcdir)/config/rules.mk
|
|
|
|
|
2001-12-09 10:05:12 +03:00
|
|
|
LOCAL_INCLUDES = \
|
2001-10-21 03:19:07 +04:00
|
|
|
-I$(srcdir)/../ds \
|
|
|
|
$(NULL)
|
1999-07-23 03:20:25 +04:00
|
|
|
|
2001-11-21 11:55:59 +03:00
|
|
|
libs::
|
1999-09-18 06:12:56 +04:00
|
|
|
$(INSTALL) $(srcdir)/test.properties $(DIST)/bin/res
|
2011-04-14 13:23:13 +04:00
|
|
|
ifneq (,$(SIMPLE_PROGRAMS))
|
2010-08-27 01:47:28 +04:00
|
|
|
$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
|
2011-04-14 13:23:13 +04:00
|
|
|
endif
|
1999-05-27 12:50:52 +04:00
|
|
|
|
2008-12-04 09:25:00 +03: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
|
|
|
|
|
2002-04-25 06:52:44 +04:00
|
|
|
install::
|
|
|
|
$(SYSINSTALL) $(IFLAGS1) $(srcdir)/test.properties $(DESTDIR)$(mozappdir)/res
|
|
|
|
|
2011-05-01 22:59:24 +04:00
|
|
|
ifeq (,$(filter-out WINNT os2-emx, $(HOST_OS_ARCH)))
|
2008-04-01 17:06:18 +04:00
|
|
|
swapslashes = $(shell echo $(1) | sed -e 's|/|\\|g')
|
|
|
|
getnativepath = $(call swapslashes,$(call normalizepath,$(1)))
|
|
|
|
else
|
|
|
|
getnativepath = $(1)
|
|
|
|
endif
|
|
|
|
|
2012-05-08 02:21:11 +04:00
|
|
|
abs_srcdir = $(call core_abspath,$(srcdir))
|
2008-04-10 20:14:01 +04:00
|
|
|
|
2010-03-10 21:36:45 +03:00
|
|
|
DIST_PATH = $(DIST)/bin/
|
|
|
|
RM_DIST = rm -f
|
|
|
|
regOrderDir="$(call getnativepath,$(abs_srcdir)/regorder)";
|
|
|
|
DOCOPY=
|
2011-05-01 22:59:24 +04:00
|
|
|
|
2005-08-11 20:41:54 +04:00
|
|
|
check::
|
2008-04-01 17:06:18 +04:00
|
|
|
XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) \
|
2010-03-10 21:36:45 +03:00
|
|
|
$(DIST)/bin/TestRegistrationOrder$(BIN_SUFFIX) $(regOrderDir)
|
2010-03-03 18:25:14 +03:00
|
|
|
|
|
|
|
GARBAGE += TestScriptable.h
|