gecko-dev/testing/marionette/mach_commands.py

126 lines
4.1 KiB
Python
Raw Normal View History

# 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 __future__ import absolute_import, unicode_literals
import os
import sys
import argparse
from mozbuild.base import (
MachCommandBase,
MachCommandConditions as conditions,
)
from mach.decorators import (
CommandArgument,
CommandProvider,
Command,
)
MARIONETTE_DISABLED_B2G = '''
The %s command requires a Marionette-enabled build.
Please create an engineering build, which has Marionette enabled. You can do
this by ommitting the VARIANT variable when building, or using:
VARIANT=eng ./build.sh
'''
def setup_argument_parser():
from marionette.runner.base import BaseMarionetteArguments
return BaseMarionetteArguments()
def run_marionette(tests, b2g_path=None, emulator=None, testtype=None,
address=None, binary=None, topsrcdir=None, **kwargs):
from mozlog.structured import commandline
from marionette.runtests import (
MarionetteTestRunner,
BaseMarionetteArguments,
MarionetteHarness
)
parser = BaseMarionetteArguments()
commandline.add_logging_group(parser)
if not tests:
tests = [os.path.join(topsrcdir,
Bug 1246407 - Rename parent directories for Marionette client and test harness; r=automatedtester This change moves testing/marionette/client to testing/marionette/harness, and testing/marionette/driver to testing/marionette/client. This parent directory name change reflects the true purpose of these Python packages. MozReview-Commit-ID: B0KrGzDTLlQ --HG-- rename : testing/marionette/driver/marionette_driver/__init__.py => testing/marionette/client/marionette_driver/__init__.py rename : testing/marionette/driver/marionette_driver/addons.py => testing/marionette/client/marionette_driver/addons.py rename : testing/marionette/driver/marionette_driver/by.py => testing/marionette/client/marionette_driver/by.py rename : testing/marionette/driver/marionette_driver/date_time_value.py => testing/marionette/client/marionette_driver/date_time_value.py rename : testing/marionette/driver/marionette_driver/decorators.py => testing/marionette/client/marionette_driver/decorators.py rename : testing/marionette/driver/marionette_driver/errors.py => testing/marionette/client/marionette_driver/errors.py rename : testing/marionette/driver/marionette_driver/expected.py => testing/marionette/client/marionette_driver/expected.py rename : testing/marionette/driver/marionette_driver/geckoinstance.py => testing/marionette/client/marionette_driver/geckoinstance.py rename : testing/marionette/driver/marionette_driver/gestures.py => testing/marionette/client/marionette_driver/gestures.py rename : testing/marionette/driver/marionette_driver/keys.py => testing/marionette/client/marionette_driver/keys.py rename : testing/marionette/driver/marionette_driver/marionette.py => testing/marionette/client/marionette_driver/marionette.py rename : testing/marionette/driver/marionette_driver/selection.py => testing/marionette/client/marionette_driver/selection.py rename : testing/marionette/driver/marionette_driver/transport.py => testing/marionette/client/marionette_driver/transport.py rename : testing/marionette/driver/marionette_driver/wait.py => testing/marionette/client/marionette_driver/wait.py rename : testing/marionette/client/MANIFEST.in => testing/marionette/harness/MANIFEST.in rename : testing/marionette/client/docs/Makefile => testing/marionette/harness/docs/Makefile rename : testing/marionette/client/docs/advanced/actions.rst => testing/marionette/harness/docs/advanced/actions.rst rename : testing/marionette/client/docs/advanced/debug.rst => testing/marionette/harness/docs/advanced/debug.rst rename : testing/marionette/client/docs/advanced/findelement.rst => testing/marionette/harness/docs/advanced/findelement.rst rename : testing/marionette/client/docs/advanced/landing.rst => testing/marionette/harness/docs/advanced/landing.rst rename : testing/marionette/client/docs/advanced/stale.rst => testing/marionette/harness/docs/advanced/stale.rst rename : testing/marionette/client/docs/basics.rst => testing/marionette/harness/docs/basics.rst rename : testing/marionette/client/docs/conf.py => testing/marionette/harness/docs/conf.py rename : testing/marionette/client/docs/index.rst => testing/marionette/harness/docs/index.rst rename : testing/marionette/client/docs/interactive.rst => testing/marionette/harness/docs/interactive.rst rename : testing/marionette/client/docs/make.bat => testing/marionette/harness/docs/make.bat rename : testing/marionette/client/docs/reference.rst => testing/marionette/harness/docs/reference.rst rename : testing/marionette/client/marionette/__init__.py => testing/marionette/harness/marionette/__init__.py rename : testing/marionette/client/marionette/atoms/b2g_update_test.js => testing/marionette/harness/marionette/atoms/b2g_update_test.js rename : testing/marionette/client/marionette/b2g_update_test.py => testing/marionette/harness/marionette/b2g_update_test.py rename : testing/marionette/client/marionette/chrome/test.xul => testing/marionette/harness/marionette/chrome/test.xul rename : testing/marionette/client/marionette/chrome/test2.xul => testing/marionette/harness/marionette/chrome/test2.xul rename : testing/marionette/client/marionette/chrome/test_anonymous_content.xul => testing/marionette/harness/marionette/chrome/test_anonymous_content.xul rename : testing/marionette/client/marionette/chrome/test_nested_iframe.xul => testing/marionette/harness/marionette/chrome/test_nested_iframe.xul rename : testing/marionette/client/marionette/marionette_test.py => testing/marionette/harness/marionette/marionette_test.py rename : testing/marionette/client/marionette/runner/__init__.py => testing/marionette/harness/marionette/runner/__init__.py rename : testing/marionette/client/marionette/runner/base.py => testing/marionette/harness/marionette/runner/base.py rename : testing/marionette/client/marionette/runner/httpd.py => testing/marionette/harness/marionette/runner/httpd.py rename : testing/marionette/client/marionette/runner/mixins/__init__.py => testing/marionette/harness/marionette/runner/mixins/__init__.py rename : testing/marionette/client/marionette/runner/mixins/b2g.py => testing/marionette/harness/marionette/runner/mixins/b2g.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/History.md => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/History.md rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/__init__.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/__init__.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/client.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/client.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/server.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/server.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/webdriver_event_listener.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/browsermobproxy/webdriver_event_listener.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/Makefile => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/Makefile rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/.buildinfo => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/.buildinfo rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_modules/browsermobproxy.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_modules/browsermobproxy.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_modules/index.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_modules/index.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/client.txt => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/client.txt rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/index.txt => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/index.txt rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/server.txt => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_sources/server.txt rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/basic.css => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/basic.css rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/default.css => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/default.css rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/doctools.js => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/doctools.js rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/jquery.js => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/jquery.js rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/pygments.css => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/pygments.css rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/searchtools.js => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/searchtools.js rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/sidebar.js => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/sidebar.js rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/underscore.js => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/underscore.js rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/websupport.js => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/_static/websupport.js rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/client.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/client.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/genindex.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/genindex.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/index.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/index.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/objects.inv => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/objects.inv rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/py-modindex.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/py-modindex.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/search.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/search.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/searchindex.js => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/searchindex.js rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/server.html => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/_build/html/server.html rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/client.rst => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/client.rst rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/conf.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/conf.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/index.rst => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/index.rst rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/make.bat => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/make.bat rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/docs/server.rst => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/docs/server.rst rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/readme.md => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/readme.md rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/setup.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/setup.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/test/test_client.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/test/test_client.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/test/test_remote.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/test/test_remote.py rename : testing/marionette/client/marionette/runner/mixins/browsermob-proxy-py/test/test_webdriver.py => testing/marionette/harness/marionette/runner/mixins/browsermob-proxy-py/test/test_webdriver.py rename : testing/marionette/client/marionette/runner/mixins/browsermob.py => testing/marionette/harness/marionette/runner/mixins/browsermob.py rename : testing/marionette/client/marionette/runner/mixins/endurance.py => testing/marionette/harness/marionette/runner/mixins/endurance.py rename : testing/marionette/client/marionette/runner/mixins/reporting.py => testing/marionette/harness/marionette/runner/mixins/reporting.py rename : testing/marionette/client/marionette/runner/mixins/resources/htmlreport/jquery.js => testing/marionette/harness/marionette/runner/mixins/resources/htmlreport/jquery.js rename : testing/marionette/client/marionette/runner/mixins/resources/htmlreport/main.js => testing/marionette/harness/marionette/runner/mixins/resources/htmlreport/main.js rename : testing/marionette/client/marionette/runner/mixins/resources/htmlreport/style.css => testing/marionette/harness/marionette/runner/mixins/resources/htmlreport/style.css rename : testing/marionette/client/marionette/runner/mixins/xmlgen.py => testing/marionette/harness/marionette/runner/mixins/xmlgen.py rename : testing/marionette/client/marionette/runtests.py => testing/marionette/harness/marionette/runtests.py rename : testing/marionette/client/marionette/tests/print-manifest-dirs.py => testing/marionette/harness/marionette/tests/print-manifest-dirs.py rename : testing/marionette/client/marionette/tests/unit-tests.ini => testing/marionette/harness/marionette/tests/unit-tests.ini rename : testing/marionette/client/marionette/tests/unit/importanotherscript.js => testing/marionette/harness/marionette/tests/unit/importanotherscript.js rename : testing/marionette/client/marionette/tests/unit/importscript.js => testing/marionette/harness/marionette/tests/unit/importscript.js rename : testing/marionette/client/marionette/tests/unit/mn-restartless-unsigned.xpi => testing/marionette/harness/marionette/tests/unit/mn-restartless-unsigned.xpi rename : testing/marionette/client/marionette/tests/unit/single_finger_functions.py => testing/marionette/harness/marionette/tests/unit/single_finger_functions.py rename : testing/marionette/client/marionette/tests/unit/test_about_pages.py => testing/marionette/harness/marionette/tests/unit/test_about_pages.py rename : testing/marionette/client/marionette/tests/unit/test_accessibility.py => testing/marionette/harness/marionette/tests/unit/test_accessibility.py rename : testing/marionette/client/marionette/tests/unit/test_addons.py => testing/marionette/harness/marionette/tests/unit/test_addons.py rename : testing/marionette/client/marionette/tests/unit/test_anonymous_content.py => testing/marionette/harness/marionette/tests/unit/test_anonymous_content.py rename : testing/marionette/client/marionette/tests/unit/test_browsermobproxy.py => testing/marionette/harness/marionette/tests/unit/test_browsermobproxy.py rename : testing/marionette/client/marionette/tests/unit/test_capabilities.py => testing/marionette/harness/marionette/tests/unit/test_capabilities.py rename : testing/marionette/client/marionette/tests/unit/test_chrome.py => testing/marionette/harness/marionette/tests/unit/test_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_chrome_async_finish.js => testing/marionette/harness/marionette/tests/unit/test_chrome_async_finish.js rename : testing/marionette/client/marionette/tests/unit/test_chrome_element_css.py => testing/marionette/harness/marionette/tests/unit/test_chrome_element_css.py rename : testing/marionette/client/marionette/tests/unit/test_clearing.py => testing/marionette/harness/marionette/tests/unit/test_clearing.py rename : testing/marionette/client/marionette/tests/unit/test_click.py => testing/marionette/harness/marionette/tests/unit/test_click.py rename : testing/marionette/client/marionette/tests/unit/test_click_chrome.py => testing/marionette/harness/marionette/tests/unit/test_click_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_click_scrolling.py => testing/marionette/harness/marionette/tests/unit/test_click_scrolling.py rename : testing/marionette/client/marionette/tests/unit/test_cookies.py => testing/marionette/harness/marionette/tests/unit/test_cookies.py rename : testing/marionette/client/marionette/tests/unit/test_data_driven.py => testing/marionette/harness/marionette/tests/unit/test_data_driven.py rename : testing/marionette/client/marionette/tests/unit/test_date_time_value.py => testing/marionette/harness/marionette/tests/unit/test_date_time_value.py rename : testing/marionette/client/marionette/tests/unit/test_elementState.py => testing/marionette/harness/marionette/tests/unit/test_elementState.py rename : testing/marionette/client/marionette/tests/unit/test_elementState_chrome.py => testing/marionette/harness/marionette/tests/unit/test_elementState_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_element_touch.py => testing/marionette/harness/marionette/tests/unit/test_element_touch.py rename : testing/marionette/client/marionette/tests/unit/test_elementsize.py => testing/marionette/harness/marionette/tests/unit/test_elementsize.py rename : testing/marionette/client/marionette/tests/unit/test_emulator.py => testing/marionette/harness/marionette/tests/unit/test_emulator.py rename : testing/marionette/client/marionette/tests/unit/test_errors.py => testing/marionette/harness/marionette/tests/unit/test_errors.py rename : testing/marionette/client/marionette/tests/unit/test_execute_async_script.py => testing/marionette/harness/marionette/tests/unit/test_execute_async_script.py rename : testing/marionette/client/marionette/tests/unit/test_execute_isolate.py => testing/marionette/harness/marionette/tests/unit/test_execute_isolate.py rename : testing/marionette/client/marionette/tests/unit/test_execute_sandboxes.py => testing/marionette/harness/marionette/tests/unit/test_execute_sandboxes.py rename : testing/marionette/client/marionette/tests/unit/test_execute_script.py => testing/marionette/harness/marionette/tests/unit/test_execute_script.py rename : testing/marionette/client/marionette/tests/unit/test_expected.py => testing/marionette/harness/marionette/tests/unit/test_expected.py rename : testing/marionette/client/marionette/tests/unit/test_expectedfail.py => testing/marionette/harness/marionette/tests/unit/test_expectedfail.py rename : testing/marionette/client/marionette/tests/unit/test_file_upload.py => testing/marionette/harness/marionette/tests/unit/test_file_upload.py rename : testing/marionette/client/marionette/tests/unit/test_findelement.py => testing/marionette/harness/marionette/tests/unit/test_findelement.py rename : testing/marionette/client/marionette/tests/unit/test_findelement_chrome.py => testing/marionette/harness/marionette/tests/unit/test_findelement_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_gesture.py => testing/marionette/harness/marionette/tests/unit/test_gesture.py rename : testing/marionette/client/marionette/tests/unit/test_getactiveframe_oop.py => testing/marionette/harness/marionette/tests/unit/test_getactiveframe_oop.py rename : testing/marionette/client/marionette/tests/unit/test_getattr.py => testing/marionette/harness/marionette/tests/unit/test_getattr.py rename : testing/marionette/client/marionette/tests/unit/test_getattr_chrome.py => testing/marionette/harness/marionette/tests/unit/test_getattr_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_implicit_waits.py => testing/marionette/harness/marionette/tests/unit/test_implicit_waits.py rename : testing/marionette/client/marionette/tests/unit/test_import_script.py => testing/marionette/harness/marionette/tests/unit/test_import_script.py rename : testing/marionette/client/marionette/tests/unit/test_import_script_reuse_window.py => testing/marionette/harness/marionette/tests/unit/test_import_script_reuse_window.py rename : testing/marionette/client/marionette/tests/unit/test_key_actions.py => testing/marionette/harness/marionette/tests/unit/test_key_actions.py rename : testing/marionette/client/marionette/tests/unit/test_log.py => testing/marionette/harness/marionette/tests/unit/test_log.py rename : testing/marionette/client/marionette/tests/unit/test_marionette.py => testing/marionette/harness/marionette/tests/unit/test_marionette.py rename : testing/marionette/client/marionette/tests/unit/test_modal_dialogs.py => testing/marionette/harness/marionette/tests/unit/test_modal_dialogs.py rename : testing/marionette/client/marionette/tests/unit/test_mouse_action.py => testing/marionette/harness/marionette/tests/unit/test_mouse_action.py rename : testing/marionette/client/marionette/tests/unit/test_multi_finger.py => testing/marionette/harness/marionette/tests/unit/test_multi_finger.py rename : testing/marionette/client/marionette/tests/unit/test_navigation.py => testing/marionette/harness/marionette/tests/unit/test_navigation.py rename : testing/marionette/client/marionette/tests/unit/test_pagesource.py => testing/marionette/harness/marionette/tests/unit/test_pagesource.py rename : testing/marionette/client/marionette/tests/unit/test_position.py => testing/marionette/harness/marionette/tests/unit/test_position.py rename : testing/marionette/client/marionette/tests/unit/test_profile_management.py => testing/marionette/harness/marionette/tests/unit/test_profile_management.py rename : testing/marionette/client/marionette/tests/unit/test_proxy.py => testing/marionette/harness/marionette/tests/unit/test_proxy.py rename : testing/marionette/client/marionette/tests/unit/test_rendered_element.py => testing/marionette/harness/marionette/tests/unit/test_rendered_element.py rename : testing/marionette/client/marionette/tests/unit/test_report.py => testing/marionette/harness/marionette/tests/unit/test_report.py rename : testing/marionette/client/marionette/tests/unit/test_run_js_test.py => testing/marionette/harness/marionette/tests/unit/test_run_js_test.py rename : testing/marionette/client/marionette/tests/unit/test_screen_orientation.py => testing/marionette/harness/marionette/tests/unit/test_screen_orientation.py rename : testing/marionette/client/marionette/tests/unit/test_screenshot.py => testing/marionette/harness/marionette/tests/unit/test_screenshot.py rename : testing/marionette/client/marionette/tests/unit/test_selected.py => testing/marionette/harness/marionette/tests/unit/test_selected.py rename : testing/marionette/client/marionette/tests/unit/test_selected_chrome.py => testing/marionette/harness/marionette/tests/unit/test_selected_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_session.py => testing/marionette/harness/marionette/tests/unit/test_session.py rename : testing/marionette/client/marionette/tests/unit/test_set_window_size.py => testing/marionette/harness/marionette/tests/unit/test_set_window_size.py rename : testing/marionette/client/marionette/tests/unit/test_shadow_dom.py => testing/marionette/harness/marionette/tests/unit/test_shadow_dom.py rename : testing/marionette/client/marionette/tests/unit/test_simpletest_chrome.js => testing/marionette/harness/marionette/tests/unit/test_simpletest_chrome.js rename : testing/marionette/client/marionette/tests/unit/test_simpletest_fail.js => testing/marionette/harness/marionette/tests/unit/test_simpletest_fail.js rename : testing/marionette/client/marionette/tests/unit/test_simpletest_pass.js => testing/marionette/harness/marionette/tests/unit/test_simpletest_pass.js rename : testing/marionette/client/marionette/tests/unit/test_simpletest_sanity.py => testing/marionette/harness/marionette/tests/unit/test_simpletest_sanity.py rename : testing/marionette/client/marionette/tests/unit/test_simpletest_timeout.js => testing/marionette/harness/marionette/tests/unit/test_simpletest_timeout.js rename : testing/marionette/client/marionette/tests/unit/test_single_finger.py => testing/marionette/harness/marionette/tests/unit/test_single_finger.py rename : testing/marionette/client/marionette/tests/unit/test_single_finger_desktop.py => testing/marionette/harness/marionette/tests/unit/test_single_finger_desktop.py rename : testing/marionette/client/marionette/tests/unit/test_skip_setup.py => testing/marionette/harness/marionette/tests/unit/test_skip_setup.py rename : testing/marionette/client/marionette/tests/unit/test_switch_frame.py => testing/marionette/harness/marionette/tests/unit/test_switch_frame.py rename : testing/marionette/client/marionette/tests/unit/test_switch_frame_chrome.py => testing/marionette/harness/marionette/tests/unit/test_switch_frame_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_switch_remote_frame.py => testing/marionette/harness/marionette/tests/unit/test_switch_remote_frame.py rename : testing/marionette/client/marionette/tests/unit/test_teardown_context_preserved.py => testing/marionette/harness/marionette/tests/unit/test_teardown_context_preserved.py rename : testing/marionette/client/marionette/tests/unit/test_text.py => testing/marionette/harness/marionette/tests/unit/test_text.py rename : testing/marionette/client/marionette/tests/unit/test_text_chrome.py => testing/marionette/harness/marionette/tests/unit/test_text_chrome.py rename : testing/marionette/client/marionette/tests/unit/test_timeouts.py => testing/marionette/harness/marionette/tests/unit/test_timeouts.py rename : testing/marionette/client/marionette/tests/unit/test_transport.py => testing/marionette/harness/marionette/tests/unit/test_transport.py rename : testing/marionette/client/marionette/tests/unit/test_typing.py => testing/marionette/harness/marionette/tests/unit/test_typing.py rename : testing/marionette/client/marionette/tests/unit/test_using_permissions.py => testing/marionette/harness/marionette/tests/unit/test_using_permissions.py rename : testing/marionette/client/marionette/tests/unit/test_using_prefs.py => testing/marionette/harness/marionette/tests/unit/test_using_prefs.py rename : testing/marionette/client/marionette/tests/unit/test_visibility.py => testing/marionette/harness/marionette/tests/unit/test_visibility.py rename : testing/marionette/client/marionette/tests/unit/test_wait.py => testing/marionette/harness/marionette/tests/unit/test_wait.py rename : testing/marionette/client/marionette/tests/unit/test_window_handles.py => testing/marionette/harness/marionette/tests/unit/test_window_handles.py rename : testing/marionette/client/marionette/tests/unit/test_window_management.py => testing/marionette/harness/marionette/tests/unit/test_window_management.py rename : testing/marionette/client/marionette/tests/unit/test_window_position.py => testing/marionette/harness/marionette/tests/unit/test_window_position.py rename : testing/marionette/client/marionette/tests/unit/test_window_switching.py => testing/marionette/harness/marionette/tests/unit/test_window_switching.py rename : testing/marionette/client/marionette/tests/unit/test_window_title.py => testing/marionette/harness/marionette/tests/unit/test_window_title.py rename : testing/marionette/client/marionette/tests/unit/test_window_type.py => testing/marionette/harness/marionette/tests/unit/test_window_type.py rename : testing/marionette/client/marionette/tests/unit/test_with_using_context.py => testing/marionette/harness/marionette/tests/unit/test_with_using_context.py rename : testing/marionette/client/marionette/tests/unit/unit-tests.ini => testing/marionette/harness/marionette/tests/unit/unit-tests.ini rename : testing/marionette/client/marionette/tests/update-tests.ini => testing/marionette/harness/marionette/tests/update-tests.ini rename : testing/marionette/client/marionette/tests/webapi-tests.ini => testing/marionette/harness/marionette/tests/webapi-tests.ini rename : testing/marionette/client/marionette/venv_b2g_update_test.sh => testing/marionette/harness/marionette/venv_b2g_update_test.sh rename : testing/marionette/client/marionette/www/bug814037.html => testing/marionette/harness/marionette/www/bug814037.html rename : testing/marionette/client/marionette/www/click_out_of_bounds_overflow.html => testing/marionette/harness/marionette/www/click_out_of_bounds_overflow.html rename : testing/marionette/client/marionette/www/clicks.html => testing/marionette/harness/marionette/www/clicks.html rename : testing/marionette/client/marionette/www/cssTransform.html => testing/marionette/harness/marionette/www/cssTransform.html rename : testing/marionette/client/marionette/www/cssTransform2.html => testing/marionette/harness/marionette/www/cssTransform2.html rename : testing/marionette/client/marionette/www/datetimePage.html => testing/marionette/harness/marionette/www/datetimePage.html rename : testing/marionette/client/marionette/www/deletingFrame.html => testing/marionette/harness/marionette/www/deletingFrame.html rename : testing/marionette/client/marionette/www/double_click.html => testing/marionette/harness/marionette/www/double_click.html rename : testing/marionette/client/marionette/www/element_bottom.html => testing/marionette/harness/marionette/www/element_bottom.html rename : testing/marionette/client/marionette/www/element_left.html => testing/marionette/harness/marionette/www/element_left.html rename : testing/marionette/client/marionette/www/element_outside_viewport.html => testing/marionette/harness/marionette/www/element_outside_viewport.html rename : testing/marionette/client/marionette/www/element_right.html => testing/marionette/harness/marionette/www/element_right.html rename : testing/marionette/client/marionette/www/element_top.html => testing/marionette/harness/marionette/www/element_top.html rename : testing/marionette/client/marionette/www/empty.html => testing/marionette/harness/marionette/www/empty.html rename : testing/marionette/client/marionette/www/formPage.html => testing/marionette/harness/marionette/www/formPage.html rename : testing/marionette/client/marionette/www/frameset.html => testing/marionette/harness/marionette/www/frameset.html rename : testing/marionette/client/marionette/www/framesetPage2.html => testing/marionette/harness/marionette/www/framesetPage2.html rename : testing/marionette/client/marionette/www/hidden.html => testing/marionette/harness/marionette/www/hidden.html rename : testing/marionette/client/marionette/www/html5/blue.jpg => testing/marionette/harness/marionette/www/html5/blue.jpg rename : testing/marionette/client/marionette/www/html5/boolean_attributes.html => testing/marionette/harness/marionette/www/html5/boolean_attributes.html rename : testing/marionette/client/marionette/www/html5/geolocation.js => testing/marionette/harness/marionette/www/html5/geolocation.js rename : testing/marionette/client/marionette/www/html5/green.jpg => testing/marionette/harness/marionette/www/html5/green.jpg rename : testing/marionette/client/marionette/www/html5/offline.html => testing/marionette/harness/marionette/www/html5/offline.html rename : testing/marionette/client/marionette/www/html5/red.jpg => testing/marionette/harness/marionette/www/html5/red.jpg rename : testing/marionette/client/marionette/www/html5/status.html => testing/marionette/harness/marionette/www/html5/status.html rename : testing/marionette/client/marionette/www/html5/test.appcache => testing/marionette/harness/marionette/www/html5/test.appcache rename : testing/marionette/client/marionette/www/html5/test_html_inputs.html => testing/marionette/harness/marionette/www/html5/test_html_inputs.html rename : testing/marionette/client/marionette/www/html5/yellow.jpg => testing/marionette/harness/marionette/www/html5/yellow.jpg rename : testing/marionette/client/marionette/www/html5Page.html => testing/marionette/harness/marionette/www/html5Page.html rename : testing/marionette/client/marionette/www/javascriptPage.html => testing/marionette/harness/marionette/www/javascriptPage.html rename : testing/marionette/client/marionette/www/macbeth.html => testing/marionette/harness/marionette/www/macbeth.html rename : testing/marionette/client/marionette/www/modal_dialogs.html => testing/marionette/harness/marionette/www/modal_dialogs.html rename : testing/marionette/client/marionette/www/nestedElements.html => testing/marionette/harness/marionette/www/nestedElements.html rename : testing/marionette/client/marionette/www/rectangles.html => testing/marionette/harness/marionette/www/rectangles.html rename : testing/marionette/client/marionette/www/resultPage.html => testing/marionette/harness/marionette/www/resultPage.html rename : testing/marionette/client/marionette/www/scroll.html => testing/marionette/harness/marionette/www/scroll.html rename : testing/marionette/client/marionette/www/scroll2.html => testing/marionette/harness/marionette/www/scroll2.html rename : testing/marionette/client/marionette/www/scroll3.html => testing/marionette/harness/marionette/www/scroll3.html rename : testing/marionette/client/marionette/www/scroll4.html => testing/marionette/harness/marionette/www/scroll4.html rename : testing/marionette/client/marionette/www/scroll5.html => testing/marionette/harness/marionette/www/scroll5.html rename : testing/marionette/client/marionette/www/shim.js => testing/marionette/harness/marionette/www/shim.js rename : testing/marionette/client/marionette/www/test.html => testing/marionette/harness/marionette/www/test.html rename : testing/marionette/client/marionette/www/testAction.html => testing/marionette/harness/marionette/www/testAction.html rename : testing/marionette/client/marionette/www/testPageSource.html => testing/marionette/harness/marionette/www/testPageSource.html rename : testing/marionette/client/marionette/www/testPageSource.xml => testing/marionette/harness/marionette/www/testPageSource.xml rename : testing/marionette/client/marionette/www/testPageSourceWithUnicodeChars.html => testing/marionette/harness/marionette/www/testPageSourceWithUnicodeChars.html rename : testing/marionette/client/marionette/www/testSize.html => testing/marionette/harness/marionette/www/testSize.html rename : testing/marionette/client/marionette/www/test_accessibility.html => testing/marionette/harness/marionette/www/test_accessibility.html rename : testing/marionette/client/marionette/www/test_carets_display_none.html => testing/marionette/harness/marionette/www/test_carets_display_none.html rename : testing/marionette/client/marionette/www/test_clearing.html => testing/marionette/harness/marionette/www/test_clearing.html rename : testing/marionette/client/marionette/www/test_dynamic.html => testing/marionette/harness/marionette/www/test_dynamic.html rename : testing/marionette/client/marionette/www/test_iframe.html => testing/marionette/harness/marionette/www/test_iframe.html rename : testing/marionette/client/marionette/www/test_inner_iframe.html => testing/marionette/harness/marionette/www/test_inner_iframe.html rename : testing/marionette/client/marionette/www/test_nested_iframe.html => testing/marionette/harness/marionette/www/test_nested_iframe.html rename : testing/marionette/client/marionette/www/test_oop_1.html => testing/marionette/harness/marionette/www/test_oop_1.html rename : testing/marionette/client/marionette/www/test_oop_2.html => testing/marionette/harness/marionette/www/test_oop_2.html rename : testing/marionette/client/marionette/www/test_selectioncarets.html => testing/marionette/harness/marionette/www/test_selectioncarets.html rename : testing/marionette/client/marionette/www/test_selectioncarets_iframe.html => testing/marionette/harness/marionette/www/test_selectioncarets_iframe.html rename : testing/marionette/client/marionette/www/test_selectioncarets_longtext.html => testing/marionette/harness/marionette/www/test_selectioncarets_longtext.html rename : testing/marionette/client/marionette/www/test_selectioncarets_multipleline.html => testing/marionette/harness/marionette/www/test_selectioncarets_multipleline.html rename : testing/marionette/client/marionette/www/test_selectioncarets_multiplerange.html => testing/marionette/harness/marionette/www/test_selectioncarets_multiplerange.html rename : testing/marionette/client/marionette/www/test_shadow_dom.html => testing/marionette/harness/marionette/www/test_shadow_dom.html rename : testing/marionette/client/marionette/www/test_touchcaret.html => testing/marionette/harness/marionette/www/test_touchcaret.html rename : testing/marionette/client/marionette/www/test_windows.html => testing/marionette/harness/marionette/www/test_windows.html rename : testing/marionette/client/marionette/www/windowHandles.html => testing/marionette/harness/marionette/www/windowHandles.html rename : testing/marionette/client/marionette/www/xhtmlTest.html => testing/marionette/harness/marionette/www/xhtmlTest.html rename : testing/marionette/client/requirements.txt => testing/marionette/harness/requirements.txt rename : testing/marionette/client/setup.py => testing/marionette/harness/setup.py extra : rebase_source : 2e2cb0e1b959bade8423f00f848995767bd5435f
2016-02-06 17:34:10 +00:00
'testing/marionette/harness/marionette/tests/unit-tests.ini')]
args = parser.parse_args(args=tests)
if b2g_path:
args.homedir = b2g_path
if emulator:
args.emulator = emulator
else:
args.binary = binary
path, exe = os.path.split(args.binary)
for k, v in kwargs.iteritems():
setattr(args, k, v)
parser.verify_usage(args)
args.logger = commandline.setup_logging("Marionette Unit Tests",
args,
{"mach": sys.stdout})
failed = MarionetteHarness(MarionetteTestRunner, args=vars(args)).run()
if failed > 0:
return 1
else:
return 0
@CommandProvider
class B2GCommands(MachCommandBase):
def __init__(self, context):
MachCommandBase.__init__(self, context)
for attr in ('b2g_home', 'device_name'):
setattr(self, attr, getattr(context, attr, None))
@Command('marionette-webapi', category='testing',
description='Run a Marionette webapi test (test WebAPIs using marionette).',
conditions=[conditions.is_b2g])
@CommandArgument('--type',
default='b2g',
help='Test type, usually one of: browser, b2g, b2g-qemu.')
@CommandArgument('--tag', action='append', dest='test_tags',
help='Filter out tests that don\'t have the given tag. Can be used '
'multiple times in which case the test must contain at least one '
'of the given tags.')
@CommandArgument('tests', nargs='*', metavar='TESTS',
help='Path to test(s) to run.')
def run_marionette_webapi(self, tests, **kwargs):
emulator = None
if self.device_name:
if self.device_name.startswith('emulator'):
emulator = 'arm'
if 'x86' in self.device_name:
emulator = 'x86'
if self.substs.get('ENABLE_MARIONETTE') != '1':
print(MARIONETTE_DISABLED_B2G % 'marionette-webapi')
return 1
return run_marionette(tests, b2g_path=self.b2g_home, emulator=emulator,
topsrcdir=self.topsrcdir, **kwargs)
@CommandProvider
class MachCommands(MachCommandBase):
@Command('marionette-test', category='testing',
description='Run a Marionette test (Check UI or the internal JavaScript using marionette).',
conditions=[conditions.is_firefox],
parser=setup_argument_parser,
)
def run_marionette_test(self, tests, **kwargs):
if 'test_objects' in kwargs:
tests = []
for obj in kwargs['test_objects']:
tests.append(obj['file_relpath'])
del kwargs['test_objects']
kwargs['binary'] = self.get_binary_path('app')
return run_marionette(tests, topsrcdir=self.topsrcdir, **kwargs)