Backed out changeset cc0306c09d59 (bug 914888) for frequent xpcshell failures. a...
[gecko.git] / testing / testsuite-targets.mk
blob2451a0ad5ab52047af17a4f39f22d791ae2970d4
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 # Shortcut for mochitest* and xpcshell-tests targets,
7 # replaces 'EXTRA_TEST_ARGS=--test-path=...'.
8 ifdef TEST_PATH
9 TEST_PATH_ARG := --test-path="$(TEST_PATH)"
10 PEPTEST_PATH_ARG := --test-path="$(TEST_PATH)"
11 IPCPLUGINS_PATH_ARG := --test-path="$(TEST_PATH)"
12 else
13 TEST_PATH_ARG :=
14 PEPTEST_PATH_ARG := --test-path=_tests/peptest/tests/firefox/firefox_all.ini
15 IPCPLUGINS_PATH_ARG := --test-path=dom/plugins/test
16 endif
18 # include automation-build.mk to get the path to the binary
19 TARGET_DEPTH = $(DEPTH)
20 include $(topsrcdir)/build/binary-location.mk
22 SYMBOLS_PATH := --symbols-path=$(DIST)/crashreporter-symbols
24 # Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] mochitest*|.
25 MOCHITESTS := mochitest-plain mochitest-chrome mochitest-a11y mochitest-ipcplugins
26 mochitest:: $(MOCHITESTS)
28 ifndef TEST_PACKAGE_NAME
29 TEST_PACKAGE_NAME := $(ANDROID_PACKAGE_NAME)
30 endif
32 RUN_MOCHITEST_B2G_DESKTOP = \
33 rm -f ./$@.log && \
34 $(PYTHON) _tests/testing/mochitest/runtestsb2g.py --autorun --close-when-done \
35 --console-level=INFO --log-file=./$@.log --file-level=INFO \
36 --desktop --profile ${GAIA_PROFILE_DIR} \
37 --failure-file=$(call core_abspath,_tests/testing/mochitest/makefailures.json) \
38 $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
40 RUN_MOCHITEST = \
41 rm -f ./$@.log && \
42 $(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done \
43 --console-level=INFO --log-file=./$@.log --file-level=INFO \
44 --failure-file=$(call core_abspath,_tests/testing/mochitest/makefailures.json) \
45 --testing-modules-dir=$(call core_abspath,_tests/modules) \
46 --extra-profile-file=$(DIST)/plugins \
47 $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
49 RERUN_MOCHITEST = \
50 rm -f ./$@.log && \
51 $(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done \
52 --console-level=INFO --log-file=./$@.log --file-level=INFO \
53 --run-only-tests=makefailures.json \
54 --testing-modules-dir=$(call core_abspath,_tests/modules) \
55 --extra-profile-file=$(DIST)/plugins \
56 $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
58 RUN_MOCHITEST_REMOTE = \
59 rm -f ./$@.log && \
60 $(PYTHON) _tests/testing/mochitest/runtestsremote.py --autorun --close-when-done \
61 --console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
62 --app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
63 --testing-modules-dir=$(call core_abspath,_tests/modules) --httpd-path=. \
64 $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
66 RUN_MOCHITEST_ROBOCOP = \
67 rm -f ./$@.log && \
68 $(PYTHON) _tests/testing/mochitest/runtestsremote.py \
69 --robocop-apk=$(DEPTH)/build/mobile/robocop/robocop-debug.apk \
70 --robocop-ids=$(DEPTH)/mobile/android/base/fennec_ids.txt \
71 --robocop-ini=$(DEPTH)/build/mobile/robocop/robocop.ini \
72 --console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
73 --app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
74 --httpd-path=. \
75 $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
77 ifndef NO_FAIL_ON_TEST_ERRORS
78 define check_test_error_internal
79 @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
80 if test "$$errors" ; then \
81 echo "$@ failed:"; \
82 echo "$$errors"; \
83 $(if $(1),echo $(1)) \
84 exit 1; \
86 endef
87 CHECK_TEST_ERROR = $(call check_test_error_internal)
88 CHECK_TEST_ERROR_RERUN = $(call check_test_error_internal,"To rerun your failures please run 'make $@-rerun-failures'")
89 endif
91 mochitest-remote: DM_TRANS?=adb
92 mochitest-remote:
93 @if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
94 echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
95 elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
96 echo "please prepare your host with the environment variable TEST_DEVICE"; \
97 else \
98 $(RUN_MOCHITEST_REMOTE); \
101 mochitest-robotium: mochitest-robocop
102 @echo "mochitest-robotium is deprecated -- please use mochitest-robocop"
104 mochitest-robocop: DM_TRANS?=adb
105 mochitest-robocop:
106 @if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
107 echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
108 elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
109 echo "please prepare your host with the environment variable TEST_DEVICE"; \
110 else \
111 $(RUN_MOCHITEST_ROBOCOP); \
114 ifdef MOZ_B2G
115 mochitest-plain:
116 @if [ "${GAIA_PROFILE_DIR}" = "" ]; then \
117 echo "please specify the GAIA_PROFILE_DIR env variable"; \
118 else \
119 $(RUN_MOCHITEST_B2G_DESKTOP); \
120 $(CHECK_TEST_ERROR_RERUN); \
122 else
123 mochitest-plain:
124 $(RUN_MOCHITEST)
125 $(CHECK_TEST_ERROR_RERUN)
126 endif
128 mochitest-plain-rerun-failures:
129 $(RERUN_MOCHITEST)
130 $(CHECK_TEST_ERROR_RERUN)
132 # Allow mochitest-1 ... mochitest-5 for developer ease
133 mochitest-1 mochitest-2 mochitest-3 mochitest-4 mochitest-5: mochitest-%:
134 echo "mochitest: $* / 5"
135 $(RUN_MOCHITEST) --chunk-by-dir=4 --total-chunks=5 --this-chunk=$*
136 $(CHECK_TEST_ERROR)
138 mochitest-chrome:
139 $(RUN_MOCHITEST) --chrome
140 $(CHECK_TEST_ERROR)
142 mochitest-a11y:
143 $(RUN_MOCHITEST) --a11y
144 $(CHECK_TEST_ERROR)
146 mochitest-ipcplugins:
147 ifeq (Darwin,$(OS_ARCH))
148 ifeq (i386,$(TARGET_CPU))
149 $(RUN_MOCHITEST) --setpref=dom.ipc.plugins.enabled.i386.test.plugin=false $(IPCPLUGINS_PATH_ARG)
150 endif
151 ifeq (x86_64,$(TARGET_CPU))
152 $(RUN_MOCHITEST) --setpref=dom.ipc.plugins.enabled.x86_64.test.plugin=false $(IPCPLUGINS_PATH_ARG)
153 endif
154 ifeq (powerpc,$(TARGET_CPU))
155 $(RUN_MOCHITEST) --setpref=dom.ipc.plugins.enabled.ppc.test.plugin=false $(IPCPLUGINS_PATH_ARG)
156 endif
157 else
158 $(RUN_MOCHITEST) --setpref=dom.ipc.plugins.enabled=false --test-path=dom/plugins/test
159 endif
160 $(CHECK_TEST_ERROR)
162 ifeq ($(OS_ARCH),Darwin)
163 webapprt_stub_path = $(TARGET_DIST)/$(MOZ_MACBUNDLE_NAME)/Contents/MacOS/webapprt-stub$(BIN_SUFFIX)
164 endif
165 ifeq ($(OS_ARCH),WINNT)
166 webapprt_stub_path = $(TARGET_DIST)/bin/webapprt-stub$(BIN_SUFFIX)
167 endif
168 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
169 webapprt_stub_path = $(TARGET_DIST)/bin/webapprt-stub$(BIN_SUFFIX)
170 endif
172 ifdef webapprt_stub_path
173 webapprt-test-content:
174 $(RUN_MOCHITEST) --webapprt-content --appname $(webapprt_stub_path)
175 $(CHECK_TEST_ERROR)
176 webapprt-test-chrome:
177 $(RUN_MOCHITEST) --webapprt-chrome --appname $(webapprt_stub_path) --browser-arg -test-mode
178 $(CHECK_TEST_ERROR)
179 endif
181 # Usage: |make [EXTRA_TEST_ARGS=...] *test|.
182 RUN_REFTEST = rm -f ./$@.log && $(PYTHON) _tests/reftest/runreftest.py \
183 --extra-profile-file=$(DIST)/plugins \
184 $(SYMBOLS_PATH) $(EXTRA_TEST_ARGS) $(1) | tee ./$@.log
186 REMOTE_REFTEST = rm -f ./$@.log && $(PYTHON) _tests/reftest/remotereftest.py \
187 --dm_trans=$(DM_TRANS) --ignore-window-size \
188 --app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
189 --httpd-path=_tests/reftest/reftest/components \
190 $(SYMBOLS_PATH) $(EXTRA_TEST_ARGS) "$(1)" | tee ./$@.log
192 RUN_REFTEST_B2G = rm -f ./$@.log && $(PYTHON) _tests/reftest/runreftestb2g.py \
193 --remote-webserver=10.0.2.2 --b2gpath=${B2G_PATH} --adbpath=${ADB_PATH} \
194 --xre-path=${MOZ_HOST_BIN} $(SYMBOLS_PATH) --ignore-window-size \
195 --httpd-path=_tests/reftest/reftest/components \
196 $(EXTRA_TEST_ARGS) "$(1)" | tee ./$@.log
198 ifeq ($(OS_ARCH),WINNT) #{
199 # GPU-rendered shadow layers are unsupported here
200 OOP_CONTENT = --setpref=browser.tabs.remote=true --setpref=layers.acceleration.disabled=true
201 GPU_RENDERING =
202 else
203 OOP_CONTENT = --setpref=browser.tabs.remote=true
204 GPU_RENDERING = --setpref=layers.acceleration.force-enabled=true
205 endif #}
207 reftest: TEST_PATH?=layout/reftests/reftest.list
208 reftest:
209 $(call RUN_REFTEST,"$(topsrcdir)/$(TEST_PATH)")
210 $(CHECK_TEST_ERROR)
212 reftest-remote: TEST_PATH?=layout/reftests/reftest.list
213 reftest-remote: DM_TRANS?=adb
214 reftest-remote:
215 @if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
216 echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
217 elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
218 echo "please prepare your host with the environment variable TEST_DEVICE"; \
219 else \
220 ln -s $(abspath $(topsrcdir)) _tests/reftest/tests; \
221 $(call REMOTE_REFTEST,tests/$(TEST_PATH)); \
222 $(CHECK_TEST_ERROR); \
225 reftest-b2g: TEST_PATH?=layout/reftests/reftest.list
226 reftest-b2g:
227 @if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
228 echo "please set the MOZ_HOST_BIN environment variable"; \
229 elif [ "${B2G_PATH}" = "" -o "${ADB_PATH}" = "" ]; then \
230 echo "please set the B2G_PATH and ADB_PATH environment variables"; \
231 else \
232 ln -s $(abspath $(topsrcdir)) _tests/reftest/tests; \
233 if [ "${REFTEST_PATH}" != "" ]; then \
234 $(call RUN_REFTEST_B2G,tests/${REFTEST_PATH}); \
235 else \
236 $(call RUN_REFTEST_B2G,tests/$(TEST_PATH)); \
237 fi; \
238 $(CHECK_TEST_ERROR); \
241 reftest-ipc: TEST_PATH?=layout/reftests/reftest.list
242 reftest-ipc:
243 $(call RUN_REFTEST,"$(topsrcdir)/$(TEST_PATH)" $(OOP_CONTENT))
244 $(CHECK_TEST_ERROR)
246 reftest-ipc-gpu: TEST_PATH?=layout/reftests/reftest.list
247 reftest-ipc-gpu:
248 $(call RUN_REFTEST,"$(topsrcdir)/$(TEST_PATH)" $(OOP_CONTENT) $(GPU_RENDERING))
249 $(CHECK_TEST_ERROR)
251 crashtest: TEST_PATH?=testing/crashtest/crashtests.list
252 crashtest:
253 $(call RUN_REFTEST,"$(topsrcdir)/$(TEST_PATH)")
254 $(CHECK_TEST_ERROR)
256 crashtest-ipc: TEST_PATH?=testing/crashtest/crashtests.list
257 crashtest-ipc:
258 $(call RUN_REFTEST,"$(topsrcdir)/$(TEST_PATH)" $(OOP_CONTENT))
259 $(CHECK_TEST_ERROR)
261 crashtest-ipc-gpu: TEST_PATH?=testing/crashtest/crashtests.list
262 crashtest-ipc-gpu:
263 $(call RUN_REFTEST,"$(topsrcdir)/$(TEST_PATH)" $(OOP_CONTENT) $(GPU_RENDERING))
264 $(CHECK_TEST_ERROR)
266 jstestbrowser: TESTS_PATH?=test-package-stage/jsreftest/tests/
267 jstestbrowser:
268 $(MAKE) -C $(DEPTH)/config
269 $(MAKE) -C $(DEPTH)/js/src/config
270 $(MAKE) stage-jstests
271 $(call RUN_REFTEST,"$(DIST)/$(TESTS_PATH)/jstests.list" --extra-profile-file=$(DIST)/test-package-stage/jsreftest/tests/user.js)
272 $(CHECK_TEST_ERROR)
274 GARBAGE += $(addsuffix .log,$(MOCHITESTS) reftest crashtest jstestbrowser)
276 # Execute all xpcshell tests in the directories listed in the manifest.
277 # See also config/rules.mk 'xpcshell-tests' target for local execution.
278 # Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] xpcshell-tests|.
279 xpcshell-tests:
280 $(info Have you considered running xpcshell tests via |mach xpcshell-test|? mach is easier to use and has more features than make and it will eventually be the only way to run xpcshell tests. Please consider using mach today!)
281 $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
282 -I$(DEPTH)/build \
283 -I$(topsrcdir)/build \
284 -I$(DEPTH)/_tests/mozbase/mozinfo \
285 $(topsrcdir)/testing/xpcshell/runxpcshelltests.py \
286 --manifest=$(DEPTH)/_tests/xpcshell/xpcshell.ini \
287 --build-info-json=$(DEPTH)/mozinfo.json \
288 --no-logfiles \
289 --test-plugin-path="$(DIST)/plugins" \
290 --tests-root-dir=$(call core_abspath,_tests/xpcshell) \
291 --testing-modules-dir=$(call core_abspath,_tests/modules) \
292 --xunit-file=$(call core_abspath,_tests/xpcshell/results.xml) \
293 --xunit-suite-name=xpcshell \
294 $(SYMBOLS_PATH) \
295 $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS) \
296 $(LIBXUL_DIST)/bin/xpcshell
298 B2G_XPCSHELL = \
299 rm -f ./@.log && \
300 $(PYTHON) -u $(topsrcdir)/config/pythonpath.py \
301 -I$(DEPTH)/build \
302 -I$(topsrcdir)/build \
303 $(topsrcdir)/testing/xpcshell/runtestsb2g.py \
304 --manifest=$(DEPTH)/_tests/xpcshell/xpcshell.ini \
305 --build-info-json=$(DEPTH)/mozinfo.json \
306 --no-logfiles \
307 --use-device-libs \
308 --no-clean \
309 --objdir=$(DEPTH) \
310 $$EXTRA_XPCSHELL_ARGS \
311 --b2gpath=${B2G_HOME} \
312 $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
314 xpcshell-tests-b2g: ADB_PATH?=$(shell which adb)
315 xpcshell-tests-b2g:
316 @if [ "${B2G_HOME}" = "" ]; then \
317 echo "Please set the B2G_HOME variable"; exit 1; \
318 elif [ ! -f "${ADB_PATH}" ]; then \
319 echo "Please set the ADB_PATH variable"; exit 1; \
320 elif [ "${EMULATOR}" != "" ]; then \
321 EXTRA_XPCSHELL_ARGS=--emulator=${EMULATOR}; \
322 $(call B2G_XPCSHELL); \
323 exit 0; \
324 else \
325 EXTRA_XPCSHELL_ARGS=--address=localhost:2828; \
326 $(call B2G_XPCSHELL); \
327 exit 0; \
330 xpcshell-tests-remote: DM_TRANS?=adb
331 xpcshell-tests-remote:
332 @if [ "${TEST_DEVICE}" != "" -o "$(DM_TRANS)" = "adb" ]; \
333 then $(PYTHON) -u $(topsrcdir)/testing/xpcshell/remotexpcshelltests.py \
334 --manifest=$(DEPTH)/_tests/xpcshell/xpcshell_android.ini \
335 --build-info-json=$(DEPTH)/mozinfo.json \
336 --no-logfiles \
337 --testing-modules-dir=$(call core_abspath,_tests/modules) \
338 --dm_trans=$(DM_TRANS) \
339 --deviceIP=${TEST_DEVICE} \
340 --objdir=$(DEPTH) \
341 $(SYMBOLS_PATH) \
342 $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS); \
343 $(CHECK_TEST_ERROR); \
344 else \
345 echo "please prepare your host with environment variables for TEST_DEVICE"; \
348 # Runs peptest, for usage see: https://developer.mozilla.org/en/Peptest#Running_Tests
349 RUN_PEPTEST = \
350 rm -f ./$@.log && \
351 $(PYTHON) _tests/peptest/runtests.py --binary=$(browser_path) \
352 $(PEPTEST_PATH_ARG) \
353 --proxy=_tests/peptest/tests/firefox/server-locations.txt \
354 --proxy-host-dirs \
355 --server-path=_tests/peptest/tests/firefox/server \
356 --log-file=./$@.log $(SYMBOLS_PATH) $(EXTRA_TEST_ARGS)
358 peptest:
359 $(RUN_PEPTEST)
360 $(CHECK_TEST_ERROR)
362 REMOTE_CPPUNITTESTS = \
363 $(PYTHON) -u $(topsrcdir)/testing/remotecppunittests.py \
364 --xre-path=$(DEPTH)/dist/bin \
365 --localLib=$(DEPTH)/dist/fennec \
366 --dm_trans=$(DM_TRANS) \
367 --deviceIP=${TEST_DEVICE} \
368 $(TEST_PATH) $(EXTRA_TEST_ARGS)
370 # Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] cppunittests-remote|.
371 cppunittests-remote: DM_TRANS?=adb
372 cppunittests-remote:
373 @if [ "${TEST_DEVICE}" != "" -o "$(DM_TRANS)" = "adb" ]; \
374 then $(call REMOTE_CPPUNITTESTS); \
375 else \
376 echo "please prepare your host with environment variables for TEST_DEVICE"; \
379 jetpack-tests:
380 $(PYTHON) $(topsrcdir)/addon-sdk/source/bin/cfx -b $(browser_path) --parseable testpkgs
382 # -- -register
383 # -- --trace-malloc malloc.log --shutdown-leaks=sdleak.log
384 leaktest:
385 $(PYTHON) _leaktest/leaktest.py $(LEAKTEST_ARGS)
387 pgo-profile-run:
388 $(PYTHON) $(topsrcdir)/build/pgo/profileserver.py $(EXTRA_TEST_ARGS)
390 # Package up the tests and test harnesses
391 include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
393 ifndef UNIVERSAL_BINARY
394 PKG_STAGE = $(DIST)/test-package-stage
395 package-tests: \
396 stage-config \
397 stage-mochitest \
398 stage-reftest \
399 stage-xpcshell \
400 stage-jstests \
401 stage-jetpack \
402 stage-peptest \
403 stage-mozbase \
404 stage-tps \
405 stage-modules \
406 stage-marionette \
407 stage-cppunittests \
408 stage-jittest \
409 $(NULL)
410 else
411 # This staging area has been built for us by universal/flight.mk
412 PKG_STAGE = $(DIST)/universal/test-package-stage
413 endif
415 package-tests:
416 @rm -f "$(DIST)/$(PKG_PATH)$(TEST_PACKAGE)"
417 ifndef UNIVERSAL_BINARY
418 $(NSINSTALL) -D $(DIST)/$(PKG_PATH)
419 else
420 #building tests.jar (bug 543800) fails on unify, so we build tests.jar after unify is run
421 $(MAKE) -C $(DEPTH)/testing/mochitest stage-chromejar PKG_STAGE=$(DIST)/universal
422 endif
423 find $(PKG_STAGE) -name "*.pyc" -exec rm {} \;
424 cd $(PKG_STAGE) && \
425 zip -rq9D "$(call core_abspath,$(DIST)/$(PKG_PATH)$(TEST_PACKAGE))" \
426 * -x \*/.mkdir.done
428 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
429 package-tests: stage-android
430 endif
432 ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
433 package-tests: stage-b2g
434 endif
436 make-stage-dir:
437 rm -rf $(PKG_STAGE)
438 $(NSINSTALL) -D $(PKG_STAGE)
439 $(NSINSTALL) -D $(PKG_STAGE)/bin
440 $(NSINSTALL) -D $(PKG_STAGE)/bin/components
441 $(NSINSTALL) -D $(PKG_STAGE)/certs
442 $(NSINSTALL) -D $(PKG_STAGE)/config
443 $(NSINSTALL) -D $(PKG_STAGE)/jetpack
444 $(NSINSTALL) -D $(PKG_STAGE)/peptest
445 $(NSINSTALL) -D $(PKG_STAGE)/mozbase
446 $(NSINSTALL) -D $(PKG_STAGE)/modules
448 stage-b2g: make-stage-dir
449 $(NSINSTALL) $(topsrcdir)/b2g/test/b2g-unittest-requirements.txt $(PKG_STAGE)/b2g
451 stage-config: make-stage-dir
452 $(NSINSTALL) -D $(PKG_STAGE)/config
453 @(cd $(topsrcdir)/testing/config && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/config && tar -xf -)
455 stage-mochitest: make-stage-dir
456 $(MAKE) -C $(DEPTH)/testing/mochitest stage-package
457 ifeq ($(MOZ_BUILD_APP),mobile/android)
458 $(NSINSTALL) $(DEPTH)/mobile/android/base/fennec_ids.txt $(PKG_STAGE)/mochitest
459 endif
461 stage-reftest: make-stage-dir
462 $(MAKE) -C $(DEPTH)/layout/tools/reftest stage-package
464 stage-xpcshell: make-stage-dir
465 $(MAKE) -C $(DEPTH)/testing/xpcshell stage-package
467 stage-jstests: make-stage-dir
468 $(MAKE) -C $(DEPTH)/js/src/tests stage-package
470 stage-android: make-stage-dir
471 ifdef MOZ_ENABLE_SZIP
472 # Tinderbox scripts are not unzipping everything, so the file needs to be in a directory it unzips
473 $(NSINSTALL) $(DIST)/host/bin/szip $(PKG_STAGE)/bin/host
474 endif
475 $(NSINSTALL) $(DEPTH)/build/mobile/sutagent/android/sutAgentAndroid.apk $(PKG_STAGE)/bin
476 $(NSINSTALL) $(DEPTH)/build/mobile/sutagent/android/watcher/Watcher.apk $(PKG_STAGE)/bin
477 $(NSINSTALL) $(DEPTH)/build/mobile/sutagent/android/fencp/FenCP.apk $(PKG_STAGE)/bin
478 $(NSINSTALL) $(DEPTH)/build/mobile/sutagent/android/ffxcp/FfxCP.apk $(PKG_STAGE)/bin
480 stage-jetpack: make-stage-dir
481 $(MAKE) -C $(DEPTH)/addon-sdk stage-tests-package
483 stage-peptest: make-stage-dir
484 $(MAKE) -C $(DEPTH)/testing/peptest stage-package
486 stage-tps: make-stage-dir
487 $(NSINSTALL) -D $(PKG_STAGE)/tps/tests
488 @(cd $(topsrcdir)/testing/tps && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/tps && tar -xf -)
489 @(cd $(topsrcdir)/services/sync/tps && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/tps && tar -xf -)
490 (cd $(topsrcdir)/services/sync/tests/tps && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/tps/tests && tar -xf -)
492 stage-modules: make-stage-dir
493 $(NSINSTALL) -D $(PKG_STAGE)/modules
494 cp -RL $(DEPTH)/_tests/modules $(PKG_STAGE)
496 CPP_UNIT_TEST_BINS=$(wildcard $(DIST)/cppunittests/*)
498 stage-cppunittests:
499 $(NSINSTALL) -D $(PKG_STAGE)/cppunittests
500 ifdef OBJCOPY
501 $(foreach bin,$(CPP_UNIT_TEST_BINS),$(OBJCOPY) --strip-unneeded $(bin) $(bin:$(DIST)/%=$(PKG_STAGE)/%);)
502 else
503 cp -RL $(DIST)/cppunittests $(PKG_STAGE)
504 endif
505 $(NSINSTALL) $(topsrcdir)/testing/runcppunittests.py $(PKG_STAGE)/cppunittests
506 $(NSINSTALL) $(topsrcdir)/testing/remotecppunittests.py $(PKG_STAGE)/cppunittests
508 stage-jittest:
509 $(NSINSTALL) -D $(PKG_STAGE)/jit-test/tests
510 cp -RL $(topsrcdir)/js/src/jsapi.h $(PKG_STAGE)/jit-test
511 cp -RL $(topsrcdir)/js/src/jit-test $(PKG_STAGE)/jit-test/jit-test
512 cp -RL $(topsrcdir)/js/src/tests/lib $(PKG_STAGE)/jit-test/tests/lib
514 MARIONETTE_DIR=$(PKG_STAGE)/marionette
515 stage-marionette: make-stage-dir
516 $(NSINSTALL) -D $(MARIONETTE_DIR)/tests
517 @(cd $(topsrcdir)/testing/marionette/client && tar --exclude marionette/tests $(TAR_CREATE_FLAGS) - *) | (cd $(MARIONETTE_DIR) && tar -xf -)
518 $(PYTHON) $(topsrcdir)/testing/marionette/client/marionette/tests/print-manifest-dirs.py \
519 $(topsrcdir) \
520 $(topsrcdir)/testing/marionette/client/marionette/tests/unit-tests.ini \
521 | (cd $(topsrcdir) && xargs tar $(TAR_CREATE_FLAGS) -) \
522 | (cd $(MARIONETTE_DIR)/tests && tar -xf -)
524 stage-mozbase: make-stage-dir
525 $(MAKE) -C $(DEPTH)/testing/mozbase stage-package
526 .PHONY: \
527 mochitest \
528 mochitest-plain \
529 mochitest-chrome \
530 mochitest-a11y \
531 mochitest-ipcplugins \
532 reftest \
533 crashtest \
534 xpcshell-tests \
535 jstestbrowser \
536 peptest \
537 package-tests \
538 make-stage-dir \
539 stage-b2g \
540 stage-config \
541 stage-mochitest \
542 stage-reftest \
543 stage-xpcshell \
544 stage-jstests \
545 stage-android \
546 stage-jetpack \
547 stage-peptest \
548 stage-mozbase \
549 stage-tps \
550 stage-modules \
551 stage-marionette \
552 $(NULL)