Bug 545892 - Always pass WM_NCPAINT events to the default event procedure. r=bent...
[mozilla-central.git] / xpcom / tests / Makefile.in
blob2bcd35d83c53f0a2f95843acfd50ca8451a1e1b2
2 # ***** BEGIN LICENSE BLOCK *****
3 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 # The contents of this file are subject to the Mozilla Public License Version
6 # 1.1 (the "License"); you may not use this file except in compliance with
7 # the License. You may obtain a copy of the License at
8 # http://www.mozilla.org/MPL/
10 # Software distributed under the License is distributed on an "AS IS" basis,
11 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 # for the specific language governing rights and limitations under the
13 # License.
15 # The Original Code is mozilla.org code.
17 # The Initial Developer of the Original Code is
18 # Netscape Communications Corporation.
19 # Portions created by the Initial Developer are Copyright (C) 1998
20 # the Initial Developer. All Rights Reserved.
22 # Contributor(s):
24 # Alternatively, the contents of this file may be used under the terms of
25 # either of the GNU General Public License Version 2 or later (the "GPL"),
26 # or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 # in which case the provisions of the GPL or the LGPL are applicable instead
28 # of those above. If you wish to allow use of your version of this file only
29 # under the terms of either the GPL or the LGPL, and not to allow others to
30 # use your version of this file under the terms of the MPL, indicate your
31 # decision by deleting the provisions above and replace them with the notice
32 # and other provisions required by the GPL or the LGPL. If you do not delete
33 # the provisions above, a recipient may use your version of this file under
34 # the terms of any one of the MPL, the GPL or the LGPL.
36 # ***** END LICENSE BLOCK *****
38 DEPTH = ../..
39 topsrcdir = @top_srcdir@
40 srcdir = @srcdir@
41 VPATH = @srcdir@
42 relativesrcdir = xpcom/tests
44 include $(DEPTH)/config/autoconf.mk
46 MODULE = xpcom
48 ifndef MOZ_ENABLE_LIBXUL
49 MOZILLA_INTERNAL_API = 1
50 endif
52 DIRS = external
54 # Disabled because manifests make this test difficult to run correctly.
55 # ifdef MOZ_ENABLE_LIBXUL
56 # DIRS += xptinfo
57 # endif
59 ifeq ($(OS_ARCH),WINNT)
60 DIRS += windows
61 endif
63 ifdef DEHYDRA_PATH
64 DIRS += static-checker
65 endif
68 CPPSRCS = \
69 nsIFileEnumerator.cpp \
70 TestCallTemplates.cpp \
71 TestINIParser.cpp \
72 TestRacingServiceManager.cpp \
73 TestRegistrationOrder.cpp \
74 TestThreadPoolListener.cpp \
75 TestTimers.cpp \
76 TestBlockingProcess.cpp \
77 TestQuickReturn.cpp \
78 TestArguments.cpp \
79 TestUnicodeArguments.cpp \
80 $(NULL)
82 ifdef WRAP_STL_INCLUDES
83 CPPSRCS += TestSTLWrappers.cpp
84 endif
86 SIMPLE_PROGRAMS := $(CPPSRCS:.cpp=$(BIN_SUFFIX))
88 CPP_UNIT_TESTS = \
89 ShowAlignments.cpp \
90 ShowSSEConfig.cpp \
91 TestAutoPtr.cpp \
92 TestCOMArray.cpp \
93 TestCOMPtr.cpp \
94 TestCOMPtrEq.cpp \
95 TestFile.cpp \
96 TestHashtables.cpp \
97 TestID.cpp \
98 TestObserverArray.cpp \
99 TestObserverService.cpp \
100 TestPipe.cpp \
101 TestRefPtr.cpp \
102 TestTextFormatter.cpp \
103 TestCheckedInt.cpp \
104 $(NULL)
106 ifndef MOZ_ENABLE_LIBXUL
107 CPP_UNIT_TESTS += \
108 TestArray.cpp \
109 TestCRT.cpp \
110 TestDeque.cpp \
111 TestEncoding.cpp \
112 TestExpirationTracker.cpp \
113 TestPipes.cpp \
114 TestPriorityQueue.cpp \
115 TestProxies.cpp \
116 TestStorageStream.cpp \
117 TestStrings.cpp \
118 TestSynchronization.cpp \
119 TestTArray.cpp \
120 TestThreadPool.cpp \
121 TestThreads.cpp \
122 TestTimeStamp.cpp \
123 TestXPIDLString.cpp \
124 TestUTF.cpp \
125 TestAtoms.cpp \
126 $(NULL)
127 # FIXME: bug 577500 TestStaticAtoms fails when run in dist/bin
128 # TestStaticAtoms.cpp
129 endif
131 ifdef MOZ_DEBUG
132 # FIXME bug 523392: TestDeadlockDetector doesn't like Windows
133 # FIXME bug 523378: also fails on OS X
134 ifneq (,$(filter-out WINNT WINCE Darwin,$(OS_ARCH)))
135 CPP_UNIT_TESTS += \
136 TestDeadlockDetector.cpp \
137 TestDeadlockDetectorScalability.cpp \
138 $(NULL)
139 endif
140 endif
142 ifndef MOZILLA_INTERNAL_API
143 CPP_UNIT_TESTS += \
144 TestStringAPI.cpp \
145 $(NULL)
146 endif
148 include $(topsrcdir)/config/config.mk
150 LIBS += $(XPCOM_LIBS)
152 # Needed to resolve __yylex (?)
153 ifeq ($(OS_ARCH)$(OS_RELEASE),FreeBSD2)
154 LIBS += -lpcap
155 endif
157 XPCSHELL_TESTS = unit
159 # Make sure we have symbols in case we need to debug these.
160 MOZ_DEBUG_SYMBOLS = 1
162 include $(topsrcdir)/config/rules.mk
164 ifeq ($(OS_ARCH),WINCE)
165 EXTRA_LIBS += libcmt.lib
166 endif
168 LOCAL_INCLUDES = \
169 -I$(srcdir)/../ds \
170 -I$(srcdir)/services \
171 $(NULL)
173 libs::
174 $(INSTALL) $(srcdir)/test.properties $(DIST)/bin/res
175 $(INSTALL) $(SIMPLE_PROGRAMS) $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
177 # Copy TestHarness.h into its own module, for ease of setting up includes
178 # correctly.
179 export::
180 $(NSINSTALL) -D $(DIST)/include/testing
181 $(INSTALL) $(srcdir)/TestHarness.h $(DIST)/include/testing
183 install::
184 $(SYSINSTALL) $(IFLAGS1) $(srcdir)/test.properties $(DESTDIR)$(mozappdir)/res
186 ifeq (,$(filter-out WINNT WINCE os2-emx, $(HOST_OS_ARCH)))
187 swapslashes = $(shell echo $(1) | sed -e 's|/|\\|g')
188 getnativepath = $(call swapslashes,$(call normalizepath,$(1)))
189 else
190 getnativepath = $(1)
191 endif
193 abs_srcdir = $(shell cd $(srcdir) && pwd)
195 ifdef WINCE
196 DM_RM = $(PYTHON) $(topsrcdir)/build/mobile/devicemanager-utils.py delete
197 DM_CP = $(PYTHON) $(topsrcdir)/build/mobile/devicemanager-utils.py copy
199 RM_DIST = $(DM_RM)
200 regOrderDir=\\tests\\regorder; # This is WinCe specific, adjust for other platforms
201 DOCOPY=$(DM_CP) $(srcdir)/regorder $(regOrderDir)
202 else
203 DIST_PATH = $(DIST)/bin/
204 RM_DIST = rm -f
205 regOrderDir="$(call getnativepath,$(abs_srcdir)/regorder)";
206 DOCOPY=
207 endif
208 check::
209 @echo "Running XPIDL tests"
210 $(XPIDL_COMPILE) -m header $(srcdir)/TestScriptable.idl
211 @if grep Notscriptable TestScriptable.h | grep NS_SCRIPTABLE >/dev/null 2>&1 ; then \
212 echo "Nonscriptable object marked scriptable by xpidl"; \
213 exit 1; \
215 @if test `grep 'NS_IMETHOD[^I].*Scriptable' TestScriptable.h | grep -v -c NS_SCRIPTABLE` -ne 0 ; then \
216 echo "Scriptable object marked nonscriptable by xpidl"; \
217 exit 1; \
219 $(RM_DIST) $(DIST_PATH)components/compreg.dat; \
220 $(DOCOPY) \
221 XPCOM_DEBUG_BREAK=stack-and-abort $(RUN_TEST_PROGRAM) \
222 $(DIST)/bin/TestRegistrationOrder$(BIN_SUFFIX) $(regOrderDir)
224 GARBAGE += TestScriptable.h