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: # Run selftests michael@0: PYTHON_UNIT_TESTS := \ michael@0: selftest.py michael@0: $(NULL) michael@0: michael@0: include $(topsrcdir)/config/rules.mk michael@0: michael@0: # Harness files from the srcdir michael@0: TEST_HARNESS_FILES := \ michael@0: runxpcshelltests.py \ michael@0: remotexpcshelltests.py \ michael@0: runtestsb2g.py \ michael@0: head.js \ michael@0: node-spdy \ michael@0: moz-spdy \ michael@0: node-http2 \ michael@0: moz-http2 \ michael@0: $(NULL) michael@0: michael@0: # Extra files needed from $(topsrcdir)/build michael@0: EXTRA_BUILD_FILES := \ michael@0: automationutils.py \ michael@0: manifestparser.py \ michael@0: $(NULL) michael@0: michael@0: MOZDEVICE_FILES := \ michael@0: devicemanager.py \ michael@0: devicemanagerADB.py \ michael@0: devicemanagerSUT.py \ michael@0: Zeroconf.py \ michael@0: $(NULL) 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: httpd.js \ michael@0: httpd.manifest \ michael@0: $(NULL) michael@0: michael@0: MOZINFO_FILES := \ michael@0: mozinfo.py 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: michael@0: libs:: michael@0: $(INSTALL) $(srcdir)/xpcshell_b2g.ini $(DEPTH)/_tests/xpcshell michael@0: $(INSTALL) $(srcdir)/xpcshell_android.ini $(DEPTH)/_tests/xpcshell michael@0: cp $(DEPTH)/_tests/xpcshell/xpcshell.ini $(DEPTH)/_tests/xpcshell/all-test-dirs.list michael@0: michael@0: stage-package: michael@0: $(NSINSTALL) -D $(PKG_STAGE)/xpcshell/tests michael@0: @(cd $(topsrcdir)/testing/mozbase/mozinfo/mozinfo && tar $(TAR_CREATE_FLAGS) - $(MOZINFO_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) michael@0: @(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) michael@0: @(cd $(topsrcdir)/build && tar $(TAR_CREATE_FLAGS) - $(EXTRA_BUILD_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) michael@0: @cp $(DEPTH)/mozinfo.json $(PKG_STAGE)/xpcshell michael@0: @cp $(DEPTH)/build/automation.py $(PKG_STAGE)/xpcshell michael@0: @(cd $(topsrcdir)/testing/mozbase/mozdevice/mozdevice && tar $(TAR_CREATE_FLAGS) - $(MOZDEVICE_FILES)) | (cd $(PKG_STAGE)/xpcshell && tar -xf -) michael@0: (cd $(DEPTH)/_tests/xpcshell/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/xpcshell/tests && tar -xf -) michael@0: @(cd $(DIST)/bin/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -)