Bug 616542 - Shorten file path length of mochitest; r=ted
[gecko.git] / testing / mochitest / Makefile.in
blob2a1adbd8a53f436fd071e88b154af20c9b0f600c
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 the GNU General Public License Version 2 or later (the "GPL"), or
26 # 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@
43 include $(DEPTH)/config/autoconf.mk
45 DIRS = \
46 MochiKit \
47 static \
48 dynamic \
49 tests \
50 chrome \
51 ssltunnel \
52 specialpowers \
53 $(NULL)
56 NO_JS_MANIFEST = 1
57 MOZ_CHROME_FILE_FORMAT = jar
58 DIST_FILES = install.rdf
60 # Used in install.rdf
61 USE_EXTENSION_MANIFEST = 1
63 XPI_NAME = mochijar
65 # we turn this off for UNIVERSAL_BINARY
66 CHROME_JAR = 1
68 include $(topsrcdir)/config/rules.mk
69 # We're installing to _mochitest, so this is the depth
70 # necessary for relative objdir paths.
71 TARGET_DEPTH = ..
72 include $(topsrcdir)/build/automation-build.mk
74 # files that get copied into $objdir/_mochitest/
75 _SERV_FILES = \
76 runtests.py \
77 automation.py \
78 runtestsremote.py \
79 runtestsvmware.py \
80 $(topsrcdir)/build/mobile/devicemanager.py \
81 $(topsrcdir)/build/mobile/devicemanagerADB.py \
82 $(topsrcdir)/build/mobile/devicemanagerSUT.py \
83 $(topsrcdir)/build/automationutils.py \
84 $(topsrcdir)/build/poster.zip \
85 $(topsrcdir)/build/mobile/remoteautomation.py \
86 gen_template.pl \
87 server.js \
88 harness-overlay.xul \
89 harness.xul \
90 browser-test-overlay.xul \
91 browser-test.js \
92 chrome-harness.js \
93 browser-harness.xul \
94 redirect.html \
95 $(topsrcdir)/build/pgo/server-locations.txt \
96 $(topsrcdir)/netwerk/test/httpserver/httpd.js \
97 mozprefs.js \
98 pywebsocket_wrapper.py \
99 plain-loop.html \
100 android.json \
101 $(NULL)
103 _PYWEBSOCKET_FILES = \
104 pywebsocket/standalone.py \
105 $(NULL)
107 _MOD_PYWEBSOCKET_FILES = \
108 pywebsocket/mod_pywebsocket/__init__.py \
109 pywebsocket/mod_pywebsocket/common.py \
110 pywebsocket/mod_pywebsocket/dispatch.py \
111 pywebsocket/mod_pywebsocket/headerparserhandler.py \
112 pywebsocket/mod_pywebsocket/http_header_util.py \
113 pywebsocket/mod_pywebsocket/memorizingfile.py \
114 pywebsocket/mod_pywebsocket/util.py \
115 pywebsocket/mod_pywebsocket/stream.py \
116 pywebsocket/mod_pywebsocket/_stream_hixie75.py \
117 pywebsocket/mod_pywebsocket/msgutil.py \
118 pywebsocket/mod_pywebsocket/_stream_hybi06.py \
119 pywebsocket/mod_pywebsocket/_stream_base.py \
120 $(NULL)
122 _HANDSHAKE_FILES = \
123 pywebsocket/mod_pywebsocket/handshake/__init__.py \
124 pywebsocket/mod_pywebsocket/handshake/hybi00.py \
125 pywebsocket/mod_pywebsocket/handshake/_base.py \
126 pywebsocket/mod_pywebsocket/handshake/draft75.py \
127 pywebsocket/mod_pywebsocket/handshake/hybi06.py \
128 $(NULL)
130 _DEST_DIR = $(DEPTH)/$(mochitestdir)
132 libs::
133 (cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - mochijar) | (cd $(_DEST_DIR) && tar -xf -)
135 libs:: $(_PYWEBSOCKET_FILES)
136 $(INSTALL) $(foreach f,$^,"$f") $(_DEST_DIR)/pywebsocket
138 libs:: $(_MOD_PYWEBSOCKET_FILES)
139 $(INSTALL) $(foreach f,$^,"$f") $(_DEST_DIR)/pywebsocket/mod_pywebsocket
141 libs:: $(_HANDSHAKE_FILES)
142 $(INSTALL) $(foreach f,$^,"$f") $(_DEST_DIR)/pywebsocket/mod_pywebsocket/handshake
144 libs:: $(_SERV_FILES)
145 $(INSTALL) $^ $(_DEST_DIR)
147 # Binaries and scripts that don't get packaged with the build,
148 # but that we need for the test harness
149 TEST_HARNESS_BINS := \
150 xpcshell$(BIN_SUFFIX) \
151 ssltunnel$(BIN_SUFFIX) \
152 certutil$(BIN_SUFFIX) \
153 pk12util$(BIN_SUFFIX) \
154 fix_stack_using_bpsyms.py \
155 $(NULL)
157 ifeq ($(OS_ARCH),WINNT)
158 TEST_HARNESS_BINS += \
159 crashinject$(BIN_SUFFIX) \
160 crashinjectdll$(DLL_SUFFIX) \
161 vmwarerecordinghelper$(DLL_SUFFIX) \
162 $(NULL)
163 endif
165 ifeq ($(OS_ARCH),Darwin)
166 TEST_HARNESS_BINS += fix_macosx_stack.py
167 endif
169 ifeq ($(OS_ARCH),Linux)
170 TEST_HARNESS_BINS += fix-linux-stack.pl
171 endif
173 ifeq (gtk2_1,$(MOZ_WIDGET_TOOLKIT)_$(MOZ_X11))
174 TEST_HARNESS_BINS += screentopng
175 endif
177 # Components / typelibs that don't get packaged with
178 # the build, but that we need for the test harness.
179 TEST_HARNESS_COMPONENTS := \
180 test_necko.xpt \
181 $(NULL)
183 # We need the test plugin as some tests rely on it
184 ifeq (Darwin,$(OS_TARGET))
185 TEST_HARNESS_PLUGINS := \
186 Test.plugin/
187 else
188 TEST_HARNESS_PLUGINS := \
189 $(DLL_PREFIX)nptest$(DLL_SUFFIX)
190 endif
192 # Rules for staging the necessary harness bits for a test package
193 PKG_STAGE = $(DIST)/test-package-stage
194 DIST_BIN = $(DIST)/bin
196 PKG_CHROMEJAR = $(PKG_STAGE)/mochitest/content/
198 ifdef CHROME_JAR
199 stage-chromejar:
200 $(NSINSTALL) -D $(PKG_CHROMEJAR)
201 cp -RL $(DEPTH)/$(mochitestdir)/browser $(PKG_CHROMEJAR)
202 cp -RL $(DEPTH)/$(mochitestdir)/chrome $(PKG_CHROMEJAR)
203 ifdef ACCESSIBILITY
204 cp -RL $(DEPTH)/$(mochitestdir)/a11y $(PKG_CHROMEJAR)
205 endif
206 @(cd $(PKG_STAGE)/mochitest && zip -r tests.jar content/)
207 @(rm -rf $(PKG_CHROMEJAR))
209 stage-package: stage-chromejar
210 endif
212 $(_DEST_DIR):
213 $(NSINSTALL) -D $@
215 stage-package:
216 $(NSINSTALL) -D $(PKG_STAGE)/mochitest && $(NSINSTALL) -D $(PKG_STAGE)/bin/plugins
217 @(cd $(DEPTH)/$(mochitestdir)/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/mochitest && tar -xf -)
218 @(cd $(DIST_BIN) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_BINS)) | (cd $(PKG_STAGE)/bin && tar -xf -)
219 @(cd $(DIST_BIN)/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -)
220 @(cd $(topsrcdir)/build/pgo/certs && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/certs && tar -xf -)
221 @(cd $(DIST_BIN)/plugins && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_PLUGINS)) | (cd $(PKG_STAGE)/bin/plugins && tar -xf -)