Bug 1301334 - Package Marionette tests via moz.build entries r=gps

Move packaging for Marionette from make to test_archiver by using root manifest files.

MozReview-Commit-ID: 1cxEBYQeJ2Z
**

--HG--
extra : rebase_source : 372a407d9207bfbccbfb88c689df60b8cc1abcaf
This commit is contained in:
Henrik Skupin 2016-09-20 18:05:43 +02:00
parent 160e0a36f6
commit 401257b7ed
5 changed files with 29 additions and 63 deletions

View File

@ -96,6 +96,35 @@ ARCHIVE_FILES = {
'base': '_tests',
'pattern': 'modules/**',
},
{
'source': buildconfig.topsrcdir,
'base': 'testing/marionette',
'patterns': [
'client/**',
'mach_test_package_commands.py',
],
'dest': 'marionette',
},
{
'source': buildconfig.topsrcdir,
'base': 'testing/marionette/harness',
'pattern': '**',
'dest': 'marionette',
'ignore': [
'marionette/tests'
]
},
{
'source': buildconfig.topsrcdir,
'base': '',
'manifests': [
'testing/marionette/harness/marionette/tests/unit-tests.ini',
'testing/marionette/harness/marionette/tests/webapi-tests.ini',
],
# We also need the manifests and harness_unit tests
'pattern': 'testing/marionette/harness/marionette/tests/**',
'dest': 'marionette/tests',
},
{
'source': buildconfig.topobjdir,
'base': '_tests',

View File

@ -1531,10 +1531,6 @@ VARIABLES = {
"""List of manifest files defining marionette-layout tests.
"""),
'MARIONETTE_LOOP_MANIFESTS': (ManifestparserManifestList, list,
"""List of manifest files defining marionette-loop tests.
"""),
'MARIONETTE_UNIT_MANIFESTS': (ManifestparserManifestList, list,
"""List of manifest files defining marionette-unit tests.
"""),

View File

@ -284,7 +284,6 @@ TEST_MANIFESTS = dict(
# marionette tests are run from the srcdir
# TODO(ato): make packaging work as for other test suites
MARIONETTE=('marionette', 'marionette', '.', False),
MARIONETTE_LOOP=('marionette', 'marionette', '.', False),
MARIONETTE_UNIT=('marionette', 'marionette', '.', False),
MARIONETTE_UPDATE=('marionette', 'marionette', '.', False),
MARIONETTE_WEBAPI=('marionette', 'marionette', '.', False),

View File

@ -1,38 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from manifestparser import TestManifest
import os.path
import sys
def print_test_dirs(topsrcdir, manifest_file):
"""
Simple routine which prints the paths of directories specified
in a Marionette manifest, relative to topsrcdir. This does not recurse
into manifests, as we currently have no need for that.
"""
dirs = set()
# output the directory of this (parent) manifest
topsrcdir = os.path.abspath(topsrcdir)
scriptdir = os.path.abspath(os.path.dirname(__file__))
dirs.add(scriptdir[len(topsrcdir) + 1:])
# output the directories of all the other manifests
manifest = TestManifest()
manifest.read(manifest_file)
for i in manifest.get():
d = os.path.dirname(i['manifest'])[len(topsrcdir) + 1:]
dirs.add(d)
for path in dirs:
path = path.replace('\\', '/')
print path
if __name__ == '__main__':
if len(sys.argv) < 3:
print >>sys.stderr, "Usage: %s topsrcdir manifest.ini" % sys.argv[0]
sys.exit(1)
print_test_dirs(sys.argv[1], sys.argv[2])

View File

@ -182,7 +182,6 @@ stage-all: \
stage-mochitest \
stage-jstests \
stage-jetpack \
stage-marionette \
stage-luciddream \
test-packages-manifest \
$(NULL)
@ -331,24 +330,6 @@ stage-luciddream: make-stage-dir
$(NSINSTALL) -D $(LUCIDDREAM_DIR)
@(cd $(topsrcdir)/testing/luciddream && tar $(TAR_CREATE_FLAGS) - *) | (cd $(LUCIDDREAM_DIR)/ && tar -xf -)
MARIONETTE_DIR=$(PKG_STAGE)/marionette
stage-marionette: make-stage-dir
$(NSINSTALL) -D $(MARIONETTE_DIR)/tests
$(NSINSTALL) -D $(MARIONETTE_DIR)/client
@(cd $(topsrcdir)/testing/marionette/harness && tar --exclude marionette/tests $(TAR_CREATE_FLAGS) - *) | (cd $(MARIONETTE_DIR)/ && tar -xf -)
@(cd $(topsrcdir)/testing/marionette/client && tar $(TAR_CREATE_FLAGS) - *) | (cd $(MARIONETTE_DIR)/client && tar -xf -)
cp $(topsrcdir)/testing/marionette/mach_test_package_commands.py $(MARIONETTE_DIR)
$(PYTHON) $(topsrcdir)/testing/marionette/harness/marionette/tests/print-manifest-dirs.py \
$(topsrcdir) \
$(topsrcdir)/testing/marionette/harness/marionette/tests/unit-tests.ini \
| (cd $(topsrcdir) && xargs tar $(TAR_CREATE_FLAGS) -) \
| (cd $(MARIONETTE_DIR)/tests && tar -xf -)
$(PYTHON) $(topsrcdir)/testing/marionette/harness/marionette/tests/print-manifest-dirs.py \
$(topsrcdir) \
$(topsrcdir)/testing/marionette/harness/marionette/tests/webapi-tests.ini \
| (cd $(topsrcdir) && xargs tar $(TAR_CREATE_FLAGS) -) \
| (cd $(MARIONETTE_DIR)/tests && tar -xf -)
stage-instrumentation-tests: make-stage-dir
$(MAKE) -C $(DEPTH)/testing/instrumentation stage-package
@ -376,7 +357,6 @@ stage-extensions: make-stage-dir
stage-jstests \
stage-android \
stage-jetpack \
stage-marionette \
stage-steeplechase \
stage-instrumentation-tests \
stage-luciddream \