michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: NO_JS_MANIFEST = 1 michael@0: MOZ_CHROME_FILE_FORMAT = jar michael@0: DIST_FILES = install.rdf michael@0: michael@0: # Used in install.rdf michael@0: USE_EXTENSION_MANIFEST = 1 michael@0: michael@0: # files that get copied into $objdir/_tests/ michael@0: SERV_FILES = \ michael@0: runtests.py \ michael@0: automation.py \ michael@0: runtestsb2g.py \ michael@0: runtestsremote.py \ michael@0: runtestsvmware.py \ michael@0: mochitest_options.py \ michael@0: manifest.webapp \ michael@0: $(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanager.py \ michael@0: $(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerADB.py \ michael@0: $(topsrcdir)/testing/mozbase/mozdevice/mozdevice/devicemanagerSUT.py \ michael@0: $(topsrcdir)/testing/mozbase/manifestdestiny/manifestparser/manifestparser.py \ michael@0: $(topsrcdir)/testing/mozbase/mozdevice/mozdevice/droid.py \ michael@0: $(topsrcdir)/testing/mozbase/mozdevice/mozdevice/Zeroconf.py \ michael@0: $(topsrcdir)/testing/mozbase/moznetwork/moznetwork/moznetwork.py \ michael@0: $(topsrcdir)/build/automationutils.py \ michael@0: $(topsrcdir)/build/mobile/remoteautomation.py \ michael@0: gen_template.pl \ michael@0: server.js \ michael@0: chunkifyTests.js \ michael@0: manifestLibrary.js \ michael@0: harness.xul \ michael@0: browser-test-overlay.xul \ michael@0: browser-test.js \ michael@0: cc-analyzer.js \ michael@0: chrome-harness.js \ michael@0: browser-harness.xul \ michael@0: redirect.html \ michael@0: $(topsrcdir)/build/pgo/server-locations.txt \ michael@0: $(topsrcdir)/netwerk/test/httpserver/httpd.js \ michael@0: pywebsocket_wrapper.py \ michael@0: android.json \ michael@0: androidx86.json \ michael@0: android23.json \ michael@0: gl.json \ michael@0: b2g_start_script.js \ michael@0: $(NULL) michael@0: michael@0: ifeq ($(MOZ_BUILD_APP),mobile/android) michael@0: SERV_FILES += \ michael@0: $(topsrcdir)/mobile/android/base/tests/robocop.ini \ michael@0: $(topsrcdir)/mobile/android/base/tests/robocop_autophone.ini \ michael@0: $(NULL) michael@0: endif michael@0: michael@0: _DEST_DIR = $(DEPTH)/_tests/$(relativesrcdir) michael@0: SERV_DEST = $(_DEST_DIR) michael@0: INSTALL_TARGETS += SERV michael@0: michael@0: PYWEBSOCKET_FILES = \ michael@0: pywebsocket/standalone.py \ michael@0: $(NULL) michael@0: PYWEBSOCKET_DEST = $(_DEST_DIR)/pywebsocket michael@0: INSTALL_TARGETS += PYWEBSOCKET michael@0: michael@0: MOD_PYWEBSOCKET_FILES = \ michael@0: pywebsocket/mod_pywebsocket/__init__.py \ michael@0: pywebsocket/mod_pywebsocket/common.py \ michael@0: pywebsocket/mod_pywebsocket/dispatch.py \ michael@0: pywebsocket/mod_pywebsocket/extensions.py \ michael@0: pywebsocket/mod_pywebsocket/headerparserhandler.py \ michael@0: pywebsocket/mod_pywebsocket/http_header_util.py \ michael@0: pywebsocket/mod_pywebsocket/memorizingfile.py \ michael@0: pywebsocket/mod_pywebsocket/util.py \ michael@0: pywebsocket/mod_pywebsocket/stream.py \ michael@0: pywebsocket/mod_pywebsocket/_stream_hixie75.py \ michael@0: pywebsocket/mod_pywebsocket/msgutil.py \ michael@0: pywebsocket/mod_pywebsocket/_stream_hybi.py \ michael@0: pywebsocket/mod_pywebsocket/_stream_base.py \ michael@0: $(NULL) michael@0: MOD_PYWEBSOCKET_DEST = $(_DEST_DIR)/pywebsocket/mod_pywebsocket michael@0: INSTALL_TARGETS += MOD_PYWEBSOCKET michael@0: michael@0: HANDSHAKE_FILES = \ michael@0: pywebsocket/mod_pywebsocket/handshake/__init__.py \ michael@0: pywebsocket/mod_pywebsocket/handshake/hybi00.py \ michael@0: pywebsocket/mod_pywebsocket/handshake/_base.py \ michael@0: pywebsocket/mod_pywebsocket/handshake/draft75.py \ michael@0: pywebsocket/mod_pywebsocket/handshake/hybi.py \ michael@0: $(NULL) michael@0: HANDSHAKE_DEST = $(_DEST_DIR)/pywebsocket/mod_pywebsocket/handshake michael@0: INSTALL_TARGETS += HANDSHAKE michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: # We're installing to _tests/testing/mochitest, so this is the depth michael@0: # necessary for relative objdir paths. michael@0: TARGET_DEPTH = ../../.. michael@0: include $(topsrcdir)/build/automation-build.mk michael@0: michael@0: libs:: michael@0: (cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - mochijar) | (cd $(_DEST_DIR) && tar -xf -) michael@0: michael@0: # Binaries and scripts that don't get packaged with the build, michael@0: # but that we need for the test harness michael@0: TEST_HARNESS_BINS := \ michael@0: xpcshell$(BIN_SUFFIX) \ michael@0: ssltunnel$(BIN_SUFFIX) \ michael@0: certutil$(BIN_SUFFIX) \ michael@0: pk12util$(BIN_SUFFIX) \ michael@0: BadCertServer$(BIN_SUFFIX) \ michael@0: OCSPStaplingServer$(BIN_SUFFIX) \ michael@0: GenerateOCSPResponse$(BIN_SUFFIX) \ michael@0: fix_stack_using_bpsyms.py \ michael@0: $(NULL) michael@0: michael@0: ifeq ($(OS_ARCH),WINNT) michael@0: TEST_HARNESS_BINS += \ michael@0: crashinject$(BIN_SUFFIX) \ michael@0: crashinjectdll$(DLL_SUFFIX) \ michael@0: vmwarerecordinghelper$(DLL_SUFFIX) \ michael@0: $(NULL) michael@0: endif michael@0: michael@0: ifeq ($(OS_ARCH),Darwin) michael@0: TEST_HARNESS_BINS += fix_macosx_stack.py michael@0: endif michael@0: michael@0: ifeq ($(OS_ARCH),Linux) michael@0: TEST_HARNESS_BINS += fix-linux-stack.pl michael@0: endif michael@0: michael@0: ifeq (gtk2_1,$(MOZ_WIDGET_TOOLKIT)_$(MOZ_X11)) michael@0: TEST_HARNESS_BINS += screentopng michael@0: endif michael@0: michael@0: ifeq (windows,$(MOZ_WIDGET_TOOLKIT)) michael@0: TEST_HARNESS_BINS += screenshot$(BIN_SUFFIX) michael@0: ifdef MOZ_METRO michael@0: TEST_HARNESS_BINS += metrotestharness$(BIN_SUFFIX) michael@0: endif michael@0: endif michael@0: michael@0: # Components / typelibs that don't get packaged with michael@0: # the build, but that we need for the test harness. michael@0: TEST_HARNESS_COMPONENTS := \ michael@0: test_necko.xpt \ michael@0: $(NULL) michael@0: michael@0: # We need the test plugin as some tests rely on it michael@0: ifeq (Darwin,$(OS_TARGET)) michael@0: TEST_HARNESS_PLUGINS := \ michael@0: Test.plugin/ \ michael@0: SecondTest.plugin/ \ michael@0: JavaTest.plugin/ michael@0: else michael@0: TEST_HARNESS_PLUGINS := \ michael@0: $(DLL_PREFIX)nptest$(DLL_SUFFIX) \ michael@0: $(DLL_PREFIX)npsecondtest$(DLL_SUFFIX) \ michael@0: $(DLL_PREFIX)nptestjava$(DLL_SUFFIX) michael@0: endif michael@0: michael@0: # Rules for staging the necessary harness bits for a test package michael@0: PKG_STAGE = $(DIST)/test-package-stage michael@0: DIST_BIN = $(DIST)/bin michael@0: michael@0: $(_DEST_DIR): michael@0: $(NSINSTALL) -D $@ michael@0: michael@0: stage-package: michael@0: $(NSINSTALL) -D $(PKG_STAGE)/mochitest && $(NSINSTALL) -D $(PKG_STAGE)/bin/plugins && $(NSINSTALL) -D $(DIST)/plugins michael@0: cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest michael@0: (cd $(DEPTH)/_tests/testing && tar $(TAR_CREATE_FLAGS) - mochitest) | (cd $(PKG_STAGE) && tar -xf -) michael@0: @cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/mochitest michael@0: @(cd $(DIST_BIN) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_BINS)) | (cd $(PKG_STAGE)/bin && tar -xf -) michael@0: @(cd $(DIST_BIN)/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -) michael@0: (cd $(topsrcdir)/build/pgo && tar $(TAR_CREATE_FLAGS) - certs) | (cd $(PKG_STAGE) && tar -xf -) michael@0: @(cd $(DIST)/plugins && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_PLUGINS)) | (cd $(PKG_STAGE)/bin/plugins && tar -xf -)