Bug 772616 - Add Marionette and Marionette tests to tests.zip, r=ted

This commit is contained in:
Jonathan Griffin 2012-07-24 16:36:46 -07:00
parent 7ccb4b84aa
commit ae83e3cc04
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,37 @@
# 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.
"""
# output the directory of this (parent) manifest
topsrcdir = os.path.abspath(topsrcdir)
scriptdir = os.path.abspath(os.path.dirname(__file__))
print scriptdir[len(topsrcdir) + 1:]
# output the directories of all the other manifests
dirs = set()
manifest = TestManifest()
manifest.read(manifest_file)
for i in manifest.get():
dirs.add(os.path.dirname(i['manifest'])[len(topsrcdir) + 1:])
for path in dirs:
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

@ -290,6 +290,7 @@ package-tests: \
stage-mozbase \
stage-tps \
stage-modules \
stage-marionette \
$(NULL)
else
# This staging area has been built for us by universal/flight.mk
@ -369,6 +370,16 @@ stage-modules: make-stage-dir
$(NSINSTALL) -D $(PKG_STAGE)/modules
cp -RL $(DEPTH)/_tests/modules $(PKG_STAGE)
MARIONETTE_DIR=$(PKG_STAGE)/marionette
stage-marionette: make-stage-dir
$(NSINSTALL) -D $(MARIONETTE_DIR)/tests
@(cd $(topsrcdir)/testing/marionette/client && tar --exclude marionette/tests $(TAR_CREATE_FLAGS) - *) | (cd $(MARIONETTE_DIR) && tar -xf -)
$(PYTHON) $(topsrcdir)/testing/marionette/client/marionette/tests/print-manifest-dirs.py \
$(topsrcdir) \
$(topsrcdir)/testing/marionette/client/marionette/tests/unit-tests.ini \
| (cd $(topsrcdir) && xargs tar $(TAR_CREATE_FLAGS_QUIET) -) \
| (cd $(MARIONETTE_DIR)/tests && tar -xf -)
stage-mozbase: make-stage-dir
$(MAKE) -C $(DEPTH)/testing/mozbase stage-package
.PHONY: \
@ -395,5 +406,6 @@ stage-mozbase: make-stage-dir
stage-mozbase \
stage-tps \
stage-modules \
stage-marionette \
$(NULL)