michael@0: # vim: set shiftwidth=8 tabstop=8 autoindent noexpandtab copyindent: 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: ifdef XPI_NAME michael@0: NO_JS_MANIFEST = 1 michael@0: DIST_FILES = install.rdf michael@0: michael@0: ifeq ($(MOZ_BUILD_APP),mobile/android) michael@0: DEFINES += -DBOOTSTRAP michael@0: DIST_FILES += bootstrap.js michael@0: endif michael@0: michael@0: ifeq ($(MOZ_BUILD_APP),b2g) michael@0: DEFINES += -DBOOTSTRAP michael@0: DEFINES += -DREFTEST_B2G michael@0: endif michael@0: michael@0: # Used in install.rdf michael@0: USE_EXTENSION_MANIFEST=1 michael@0: else michael@0: EXTRA_COMPONENTS += reftest-cmdline.manifest michael@0: endif michael@0: michael@0: _DEST_DIR = $(DEPTH)/_tests/reftest michael@0: michael@0: _HARNESS_FILES = \ michael@0: $(srcdir)/runreftest.py \ michael@0: $(srcdir)/remotereftest.py \ michael@0: $(srcdir)/runreftestb2g.py \ michael@0: $(srcdir)/b2g_desktop.py \ michael@0: automation.py \ 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/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/mobile/b2gautomation.py \ michael@0: $(topsrcdir)/build/automationutils.py \ michael@0: $(topsrcdir)/build/mobile/remoteautomation.py \ michael@0: $(topsrcdir)/testing/mochitest/server.js \ michael@0: $(topsrcdir)/build/pgo/server-locations.txt \ michael@0: $(NULL) michael@0: michael@0: _HARNESS_PP_FILES = \ michael@0: b2g_start_script.js \ michael@0: $(NULL) michael@0: _HARNESS_PP_FILES_PATH = $(_DEST_DIR) michael@0: PP_TARGETS += _HARNESS_PP_FILES michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: # We're installing to _tests/reftest michael@0: TARGET_DEPTH = ../.. michael@0: include $(topsrcdir)/build/automation-build.mk michael@0: michael@0: # We want to get an extension-packaged version of reftest as well, michael@0: # so this seems to be the simplest way to make that happen. michael@0: ifndef XPI_NAME michael@0: make-xpi: michael@0: +$(MAKE) -C $(DEPTH)/netwerk/test/httpserver libs XPI_NAME=reftest michael@0: +$(MAKE) libs XPI_NAME=reftest michael@0: copy-harness: make-xpi michael@0: libs:: copy-harness michael@0: endif michael@0: michael@0: $(_DEST_DIR): michael@0: $(NSINSTALL) -D $@ michael@0: michael@0: $(_HARNESS_FILES): $(_DEST_DIR) michael@0: michael@0: # copy harness and the reftest extension bits to $(_DEST_DIR) michael@0: copy-harness: $(_HARNESS_FILES) $(addprefix $(_DEST_DIR)/,$(_HARNESS_PP_FILES)) michael@0: $(INSTALL) $(_HARNESS_FILES) $(_DEST_DIR) michael@0: (cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - reftest) | (cd $(_DEST_DIR) && tar -xf -) michael@0: michael@0: PKG_STAGE = $(DIST)/test-package-stage michael@0: michael@0: # stage harness and tests for packaging michael@0: stage-package: michael@0: $(NSINSTALL) -D $(PKG_STAGE)/reftest && $(NSINSTALL) -D $(PKG_STAGE)/reftest/tests michael@0: (cd $(DEPTH)/_tests/reftest/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/reftest && tar -xf -) michael@0: $(PYTHON) $(topsrcdir)/layout/tools/reftest/print-manifest-dirs.py \ michael@0: $(topsrcdir) \ michael@0: $(topsrcdir)/layout/reftests/reftest.list \ michael@0: $(topsrcdir)/testing/crashtest/crashtests.list \ michael@0: | (cd $(topsrcdir) && xargs tar $(TAR_CREATE_FLAGS) -) \ michael@0: | (cd $(PKG_STAGE)/reftest/tests && tar -xf -)