DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5b81998bb7ab)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
#
# 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@
relativesrcdir = @relativesrcdir@

include $(DEPTH)/config/autoconf.mk

MODULE		= xpcom

DIRS		= \
  external \
  component \
  bug656331_component \
  component_no_aslr \
  $(NULL)

ifeq ($(OS_ARCH),WINNT)
DIRS		+= windows
endif

ifdef DEHYDRA_PATH
DIRS += static-checker
endif

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)

ifeq ($(OS_TARGET),WINNT)
CPPSRCS += TestBase64.cpp
endif

ifdef WRAP_STL_INCLUDES
CPPSRCS += TestSTLWrappers.cpp
endif

SIMPLE_PROGRAMS	:= $(CPPSRCS:.cpp=$(BIN_SUFFIX))

CPP_UNIT_TESTS = \
                 ShowAlignments.cpp \
                 ShowSSEConfig.cpp \
                 TestAutoPtr.cpp \
                 TestAutoRef.cpp \
                 TestBloomFilter.cpp \
                 TestCOMArray.cpp \
                 TestCOMPtr.cpp \
                 TestCOMPtrEq.cpp \
                 TestDeque.cpp \
                 TestFile.cpp \
                 TestHashtables.cpp \
                 TestID.cpp \
                 TestObserverArray.cpp \
                 TestObserverService.cpp \
                 TestPipe.cpp \
                 TestRefPtr.cpp \
                 TestSettingsAPI.cpp \
                 TestTextFormatter.cpp \
                 TestTArray.cpp \
                 $(NULL)

ifdef MOZ_MEMORY
CPP_UNIT_TESTS += TestJemalloc.cpp
endif

# 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

ifdef MOZ_DEBUG
# FIXME bug 523392: TestDeadlockDetector doesn't like Windows
# FIXME bug 523378: also fails on OS X
ifneq (,$(filter-out WINNT Darwin,$(OS_ARCH)))
CPP_UNIT_TESTS += \
                  TestDeadlockDetector.cpp \
                  TestDeadlockDetectorScalability.cpp \
                  $(NULL)
endif
endif

ifndef MOZILLA_INTERNAL_API
CPP_UNIT_TESTS += \
                  TestStringAPI.cpp \
                  $(NULL)
endif

include $(topsrcdir)/config/config.mk

LIBS += $(XPCOM_LIBS)

# Needed to resolve __yylex (?)
ifeq ($(OS_ARCH)$(OS_RELEASE),FreeBSD2)
LIBS		+= -lpcap
endif

XPCSHELL_TESTS = unit

# Make sure we have symbols in case we need to debug these.
MOZ_DEBUG_SYMBOLS = 1

include $(topsrcdir)/config/rules.mk

LOCAL_INCLUDES	= \
                -I$(srcdir)/../ds \
		$(NULL)

libs::
	$(INSTALL) $(srcdir)/test.properties $(DIST)/bin/res
ifneq (,$(SIMPLE_PROGRAMS))
	$(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
endif

# 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

install::
	$(SYSINSTALL) $(IFLAGS1) $(srcdir)/test.properties $(DESTDIR)$(mozappdir)/res

ifeq (,$(filter-out WINNT os2-emx, $(HOST_OS_ARCH)))
getnativepath = $(call normalizepath,$(1))
else
getnativepath = $(1)
endif

abs_srcdir = $(call core_abspath,$(srcdir))

DIST_PATH = $(DIST)/bin/
RM_DIST = rm -f
regOrderDir="$(call getnativepath,$(abs_srcdir)/regorder)";
DOCOPY=

check::
	XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) \
	  $(DIST)/bin/TestRegistrationOrder$(BIN_SUFFIX) $(regOrderDir)

GARBAGE += TestScriptable.h