--- a/browser/components/migration/tests/marionette/manifest.ini
+++ b/browser/components/migration/tests/marionette/manifest.ini
@@ -1,8 +1,5 @@
[DEFAULT]
-qemu = false
-b2g = false
-browser = true
-skip = false
+run-if = buildapp == 'browser'
[test_refresh_firefox.py]
--- a/browser/extensions/loop/manifest.ini
+++ b/browser/extensions/loop/manifest.ini
@@ -8,14 +8,12 @@
;
; Hence we duplicate the same files as support files, so that they can be loaded
; in a content context.
;
; This might get messy if we start having pre-processed files, but for now it
; seems to work.
[DEFAULT]
-b2g = false
-browser = true
-qemu = false
+run-if = buildapp == 'browser'
[chrome/content/shared/test/test_shared_all.py]
[chrome/content/panels/test/test_desktop_all.py]
--- a/browser/extensions/loop/test/functional/manifest.ini
+++ b/browser/extensions/loop/test/functional/manifest.ini
@@ -1,7 +1,5 @@
[DEFAULT]
-b2g = false
-browser = true
-qemu = false
+run-if = buildapp == 'browser'
[test_1_browser_call.py]
[test_2_linkclicker.py]
--- a/dom/battery/test/marionette/manifest.ini
+++ b/dom/battery/test/marionette/manifest.ini
@@ -1,12 +1,10 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_battery_level.js]
[test_battery_status_charging.js]
[test_battery_status_discharging.js]
[test_battery_status_full.js]
[test_battery_status_not_charging.js]
[test_battery_status_unknown.js]
[test_deprecated_battery_level.js]
--- a/dom/bluetooth/tests/marionette/manifest.ini
+++ b/dom/bluetooth/tests/marionette/manifest.ini
@@ -1,23 +1,18 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = false
-
-# Hint: "disabled = xxxxx" statement should be added *below* the test that
-# we want to disable.
+run-if = buildapp == 'b2g'
[test_dom_BluetoothManager.js]
skip-if = android_version < '19'
[test_dom_BluetoothAdapter_enable.js]
skip-if = android_version < '19'
[test_dom_BluetoothAdapter_setters.js]
skip-if = android_version < '19'
[test_dom_BluetoothDevice.js]
-disabled = Bug 1175389
+skip-if = true # Bug 1175389
[test_dom_BluetoothAdapter_discovery.js]
-disabled = Bug 1175389
+skip-if = true # Bug 1175389
[test_dom_BluetoothAdapter_pair.js]
-disabled = Bug 1175389
+skip-if = true # Bug 1175389
--- a/dom/cellbroadcast/tests/marionette/manifest.ini
+++ b/dom/cellbroadcast/tests/marionette/manifest.ini
@@ -1,13 +1,11 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_cellbroadcast_etws.js]
[test_cellbroadcast_gsm.js]
[test_cellbroadcast_gsm_language_and_body.js]
-disabled = Bug 1231462
+skip-if = true # Bug 1231462
[test_cellbroadcast_multi_sim.js]
[test_cellbroadcast_umts.js]
[test_cellbroadcast_umts_language_and_body.js]
-disabled = Bug 1224992
+skip-if = true # Bug 1224992
--- a/dom/events/test/marionette/manifest.ini
+++ b/dom/events/test/marionette/manifest.ini
@@ -1,6 +1,4 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_sensor_orientation.js]
--- a/dom/fmradio/test/marionette/manifest.ini
+++ b/dom/fmradio/test/marionette/manifest.ini
@@ -1,13 +1,10 @@
[DEFAULT]
-b2g = true
-browser = false
-; We don't support FM radio emulation yet, see bug 872417
-qemu = false
+run-if = buildapp == 'b2g'
[test_enable_disable.js]
[test_set_frequency.js]
[test_cancel_seek.js]
[test_one_seek_at_once.js]
[test_seek_up_and_down.js]
[test_bug862672.js]
[test_bug876597.js]
--- a/dom/icc/tests/marionette/manifest.ini
+++ b/dom/icc/tests/marionette/manifest.ini
@@ -1,12 +1,10 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_icc_contact_read.js]
[test_icc_contact_add.js]
[test_icc_contact_update.js]
[test_icc_card_lock_get_retry_count.js]
[test_icc_card_lock_change_pin.js]
[test_icc_card_lock_enable_pin.js]
[test_icc_card_lock_unlock_pin.js]
--- a/dom/mobileconnection/tests/marionette/manifest.ini
+++ b/dom/mobileconnection/tests/marionette/manifest.ini
@@ -1,19 +1,17 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_mobile_networks.js]
[test_mobile_voice_state.js]
[test_mobile_voice_location.js]
[test_mobile_operator_names.js]
[test_mobile_operator_names_plmnlist.js]
-disabled = Bug 1234746
+skip-if = true # Bug 1234746
[test_mobile_operator_names_roaming.js]
[test_mobile_preferred_network_type.js]
[test_mobile_preferred_network_type_radio_off.js]
[test_mobile_data_connection.js]
[test_mobile_data_location.js]
[test_mobile_data_state.js]
[test_mobile_roaming_preference.js]
[test_call_barring_basic_operations.js]
--- a/dom/mobilemessage/tests/marionette/manifest.ini
+++ b/dom/mobilemessage/tests/marionette/manifest.ini
@@ -1,12 +1,10 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
;[test_between_emulators.py]
[test_bug814761.js]
[test_decode_spanish_fallback.js]
[test_emulator_loopback.js]
[test_error_of_mms_manual_retrieval.js]
[test_error_of_mms_send.js]
[test_error_of_sms_send.js]
--- a/dom/network/tests/marionette/manifest.ini
+++ b/dom/network/tests/marionette/manifest.ini
@@ -1,12 +1,10 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_ethernet_add_interface.js]
[test_ethernet_remove_interface.js]
[test_ethernet_enable.js]
[test_ethernet_disable.js]
[test_ethernet_connect_with_dhcp.js]
[test_ethernet_connect_with_static_ip.js]
[test_ethernet_reconnect_with_dhcp.js]
--- a/dom/nfc/tests/marionette/manifest.ini
+++ b/dom/nfc/tests/marionette/manifest.ini
@@ -1,12 +1,10 @@
[DEFAULT]
-b2g=true
-browser=false
-qemu=true
+run-if = buildapp == 'b2g'
[test_ndef.js]
[test_nfc_enabled.js]
[test_nfc_manager_tech_discovered.js]
[test_nfc_manager_tech_discovered_ndef.js]
[test_nfc_manager_tech_lost.js]
[test_nfc_peer.js]
[test_nfc_peer_sendndef.js]
--- a/dom/system/gonk/tests/marionette/manifest.ini
+++ b/dom/system/gonk/tests/marionette/manifest.ini
@@ -1,15 +1,13 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_geolocation.js]
-disabled = Bug 808783
+skip-if = true # Bug 808783
[test_fakevolume.js]
[test_ril_code_quality.py]
[test_screen_state.js]
[test_dsds_numRadioInterfaces.js]
[test_data_connection.js]
[test_network_active_changed.js]
[test_multiple_data_connection.js]
[test_data_connection_proxy.js]
--- a/dom/system/tests/marionette/manifest.ini
+++ b/dom/system/tests/marionette/manifest.ini
@@ -1,7 +1,5 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_proximity_init.js]
[test_proximity_change.js]
--- a/dom/telephony/test/marionette/manifest.ini
+++ b/dom/telephony/test/marionette/manifest.ini
@@ -1,12 +1,10 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_audiomanager_phonestate.js]
[test_call_mute.js]
[test_call_presentation.js]
[test_cdma_call_waiting.js]
[test_conference_add_error.js]
[test_conference_add_twice_error.js]
[test_conference_remove_error.js]
@@ -20,19 +18,19 @@ qemu = true
[test_consecutive_hold.js]
[test_crash_emulator.js]
[test_dsds_connection_conflict.js]
[test_dsds_normal_call.js]
[test_dtmf.js]
[test_emergency.js]
[test_emergency_label.js]
[test_gsm_cdma_incoming_basic_operations.js]
-disabled = Bug 1214537
+skip-if = true # Bug 1214537
[test_gsm_cdma_outgoing_basic_operations.js]
-disabled = Bug 1214537
+skip-if = true # Bug 1214537
[test_incall_mmi_call_hold.js]
[test_incall_mmi_call_waiting.js]
[test_incall_mmi_conference.js]
[test_incall_mmi_imei.js]
[test_incoming_already_connected.js]
[test_incoming_already_held.js]
[test_incoming_answer_hangup_oncallschanged.js]
[test_incoming_onstatechange.js]
--- a/dom/tethering/tests/marionette/manifest.ini
+++ b/dom/tethering/tests/marionette/manifest.ini
@@ -1,9 +1,7 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_wifi_tethering_enabled.js]
; The following test must be the last tethering test ran, as it sets the
; 'ro.tethering.dun_required' property.
[test_wifi_tethering_dun.js]
--- a/dom/voicemail/test/marionette/manifest.ini
+++ b/dom/voicemail/test/marionette/manifest.ini
@@ -1,8 +1,6 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_voicemail_dsds_default_service_id.js]
[test_voicemail_number.js]
[test_voicemail_statuschanged.js]
--- a/dom/wifi/test/marionette/manifest.ini
+++ b/dom/wifi/test/marionette/manifest.ini
@@ -1,12 +1,10 @@
[DEFAULT]
-b2g = true
-browser = false
-qemu = true
+run-if = buildapp == 'b2g'
[test_wifi_enable.js]
[test_wifi_scan.js]
[test_wifi_associate.js]
[test_wifi_associate_wo_connect.js]
[test_wifi_auto_connect.js]
[test_wifi_static_ip.js]
[test_wifi_tethering_wifi_disabled.js]
--- a/layout/base/tests/marionette/manifest.ini
+++ b/layout/base/tests/marionette/manifest.ini
@@ -1,15 +1,5 @@
[DEFAULT]
-; true if the test requires an emulator, otherwise false
-qemu = false
-
-; true if the test is compatible with the browser, otherwise false
-browser = true
-
-; true if the test is compatible with b2g, otherwise false
-b2g = true
-
-; true if the test should be skipped
-skip = false
+run-if = buildapp == 'browser'
[test_accessiblecaret_cursor_mode.py]
[test_accessiblecaret_selection_mode.py]
--- a/testing/marionette/harness/marionette/runner/base.py
+++ b/testing/marionette/harness/marionette/runner/base.py
@@ -314,22 +314,16 @@ class BaseMarionetteArguments(ArgumentPa
help='host:port of running Gecko instance to connect to')
self.add_argument('--device',
dest='device_serial',
help='serial ID of a device to use for adb / fastboot')
self.add_argument('--adb-host',
help='host to use for adb connection')
self.add_argument('--adb-port',
help='port to use for adb connection')
- self.add_argument('--type',
- help="the type of test to run, can be a combination of values defined in the manifest file; "
- "individual values are combined with '+' or '-' characters. for example: 'browser+b2g' "
- "means the set of tests which are compatible with both browser and b2g; 'b2g-qemu' means "
- "the set of tests which are compatible with b2g but do not require an emulator. this "
- "argument is only used when loading tests from manifest files")
self.add_argument('--homedir',
help='home directory of emulator files')
self.add_argument('--app',
help='application to use')
self.add_argument('--app-arg',
dest='app_args',
action='append',
default=[],
@@ -535,17 +529,17 @@ class BaseMarionetteTestRunner(object):
textrunnerclass = MarionetteTextTestRunner
driverclass = Marionette
def __init__(self, address=None, emulator=None, emulator_binary=None,
emulator_img=None, emulator_res='480x800', homedir=None,
app=None, app_args=None, binary=None, profile=None,
logger=None, no_window=False, logdir=None, logcat_stdout=False,
- repeat=0, testvars=None, tree=None, type=None,
+ repeat=0, testvars=None, tree=None,
device_serial=None, symbols_path=None, timeout=None,
shuffle=False, shuffle_seed=random.randint(0, sys.maxint),
sdcard=None, this_chunk=1, total_chunks=1, sources=None,
server_root=None, gecko_log=None, result_callbacks=None,
adb_host=None, adb_port=None, prefs=None, test_tags=None,
socket_timeout=BaseMarionetteArguments.socket_timeout_default,
startup_timeout=None, addons=None, workspace=None,
verbose=0, e10s=True, **kwargs):
@@ -564,17 +558,16 @@ class BaseMarionetteTestRunner(object):
self.no_window = no_window
self.httpd = None
self.marionette = None
self.logdir = logdir
self.logcat_stdout = logcat_stdout
self.repeat = repeat
self.test_kwargs = kwargs
self.tree = tree
- self.type = type
self.device_serial = device_serial
self.symbols_path = symbols_path
self.timeout = timeout
self.socket_timeout = socket_timeout
self._device = None
self._capabilities = None
self._appinfo = None
self._appName = None
@@ -1022,28 +1015,17 @@ setReq.onerror = function() {
for root, dirs, files in os.walk(filepath):
for filename in files:
if (filename.startswith('test_') and
(filename.endswith('.py') or filename.endswith('.js'))):
filepath = os.path.join(root, filename)
self.add_test(filepath)
return
- testargs = {}
- if self.type is not None:
- testtypes = self.type.replace('+', ' +').replace('-', ' -').split()
- for atype in testtypes:
- if atype.startswith('+'):
- testargs.update({ atype[1:]: 'true' })
- elif atype.startswith('-'):
- testargs.update({ atype[1:]: 'false' })
- else:
- testargs.update({ atype: 'true' })
-
- testarg_b2g = bool(testargs.get('b2g'))
+ testarg_b2g = mozinfo.info.get('appname') == 'b2g'
file_ext = os.path.splitext(os.path.split(filepath)[-1])[1]
if file_ext == '.ini':
manifest = TestManifest()
manifest.read(filepath)
filters = []
@@ -1058,28 +1040,22 @@ setReq.onerror = function() {
app=self.appName,
e10s=self.e10s,
**mozinfo.info)
if len(manifest_tests) == 0:
self.logger.error("no tests to run using specified "
"combination of filters: {}".format(
manifest.fmt_filters()))
- unfiltered_tests = []
+ target_tests = []
for test in manifest_tests:
if test.get('disabled'):
self.manifest_skipped_tests.append(test)
else:
- unfiltered_tests.append(test)
-
- target_tests = manifest.get(tests=unfiltered_tests, **testargs)
- for test in unfiltered_tests:
- if test['path'] not in [x['path'] for x in target_tests]:
- test.setdefault('disabled', 'filtered by type (%s)' % self.type)
- self.manifest_skipped_tests.append(test)
+ target_tests.append(test)
for i in target_tests:
if not os.path.exists(i["path"]):
raise IOError("test file: %s does not exist" % i["path"])
file_ext = os.path.splitext(os.path.split(i['path'])[-1])[-1]
test_container = None
if i.get('test_container') and testarg_b2g:
--- a/testing/marionette/harness/marionette/tests/unit-tests.ini
+++ b/testing/marionette/harness/marionette/tests/unit-tests.ini
@@ -1,21 +1,8 @@
-[DEFAULT]
-; true if the test requires an emulator, otherwise false
-qemu = false
-
-; true if the test is compatible with the browser, otherwise false
-browser = true
-
-; true if the test is compatible with b2g, otherwise false
-b2g = true
-
-; true if the test should be skipped
-skip = false
-
; marionette unit tests
[include:unit/unit-tests.ini]
test_container = true
; layout tests
[include:../../../../../layout/base/tests/marionette/manifest.ini]
; loop tests
--- a/testing/marionette/harness/marionette/tests/unit/unit-tests.ini
+++ b/testing/marionette/harness/marionette/tests/unit/unit-tests.ini
@@ -1,163 +1,137 @@
-[DEFAULT]
-; true if the test requires an emulator, otherwise false
-qemu = false
-
-; true if the test is compatible with the browser, otherwise false
-browser = true
-
-; true if the test is compatible with b2g, otherwise false
-b2g = true
-
-; true if the test should be skipped
-skip = false
-
[test_marionette.py]
[test_data_driven.py]
[test_session.py]
[test_capabilities.py]
[test_accessibility.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_expectedfail.py]
expected = fail
[test_import_script.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_click.py]
[test_click_chrome.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_selected.py]
[test_selected_chrome.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_getattr.py]
[test_getattr_chrome.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_elementsize.py]
[test_position.py]
[test_rendered_element.py]
[test_chrome_element_css.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_elementState.py]
[test_elementState_chrome.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_text.py]
[test_text_chrome.py]
-disabled = "Bug 896046"
+skip-if = true # "Bug 896046"
[test_clearing.py]
[test_typing.py]
[test_log.py]
[test_emulator.py]
-qemu = true
[test_about_pages.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_execute_async_script.py]
[test_execute_script.py]
[test_simpletest_fail.js]
[test_findelement.py]
[test_findelement_chrome.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_navigation.py]
[test_timeouts.py]
[test_element_touch.py]
-b2g = true
-browser = false
+skip-if = buildapp != 'b2g'
[test_gesture.py]
-disabled = "Bug 1060060"
-b2g = true
-browser = false
+skip-if = true # buildapp != 'b2g' -- Bug 1060060
[test_single_finger.py]
-disabled = "Bug 1060060"
-b2g = true
-browser = false
+skip-if = true # buildapp != 'b2g' -- Bug 1060060
[test_single_finger_desktop.py]
-b2g = false
-skip-if = os == "win" # Bug 1025040
+skip-if = buildapp == 'b2g' || os == "win" # Bug 1025040
[test_multi_finger.py]
-disabled = "Bug 1060060"
-b2g = true
-browser = false
+skip-if = true # buildapp != 'b2g' -- Bug 1060060
[test_simpletest_pass.js]
[test_simpletest_sanity.py]
[test_simpletest_chrome.js]
[test_simpletest_timeout.js]
[test_anonymous_content.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_switch_frame.py]
-b2g = false
-skip-if = os == "win" # Bug 1078237
+skip-if = buildapp == 'b2g' || os == "win" # Bug 1078237
[test_switch_frame_chrome.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_switch_remote_frame.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_pagesource.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_visibility.py]
[test_window_switching.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_window_management.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_window_position.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_window_handles.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_screenshot.py]
[test_cookies.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_window_title.py]
[test_window_type.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_implicit_waits.py]
[test_wait.py]
[test_expected.py]
[test_date_time_value.py]
[test_getactiveframe_oop.py]
-disabled = "Bug 925688"
-b2g = false
+skip-if = true # buildapp == 'b2g' -- Bug 925688
[test_chrome_async_finish.js]
[test_screen_orientation.py]
[test_errors.py]
[test_execute_isolate.py]
[test_click_scrolling.py]
[test_profile_management.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_set_window_size.py]
-b2g = false
-skip-if = os == "linux" # Bug 1085717
+skip-if = buildapp == 'b2g' || os == "linux" # Bug 1085717
[test_with_using_context.py]
[test_modal_dialogs.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_key_actions.py]
[test_mouse_action.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_teardown_context_preserved.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_file_upload.py]
-b2g = false
-skip-if = os == "win" # http://bugs.python.org/issue14574
+skip-if = buildapp == 'b2g' || os == "win" # http://bugs.python.org/issue14574
[test_execute_sandboxes.py]
[test_using_permissions.py]
[test_using_prefs.py]
[test_shadow_dom.py]
[test_chrome.py]
-b2g = false
+skip-if = buildapp == 'b2g'
[test_addons.py]
--- a/testing/marionette/harness/marionette/tests/update-tests.ini
+++ b/testing/marionette/harness/marionette/tests/update-tests.ini
@@ -1,18 +1,8 @@
[DEFAULT]
-; true if the test requires an emulator, otherwise false
-qemu = false
-
-; true if the test is compatible with the browser, otherwise false
-browser = false
-
-; true if the test is compatible with b2g, otherwise false
-b2g = true
-
-; true if the test should be skipped
-skip = false
+run-if = buildapp == 'b2g'
; this is currently only set by high level update smoketests
smoketest = false
; AUS tests
[include:../../../../../toolkit/mozapps/update/tests/marionette/update-tests.ini]
--- a/testing/marionette/harness/marionette/tests/webapi-tests.ini
+++ b/testing/marionette/harness/marionette/tests/webapi-tests.ini
@@ -1,21 +1,8 @@
-[DEFAULT]
-; true if the test requires an emulator, otherwise false
-qemu = false
-
-; true if the test is compatible with the browser, otherwise false
-browser = true
-
-; true if the test is compatible with b2g, otherwise false
-b2g = true
-
-; true if the test should be skipped
-skip = false
-
[include:../../../../../dom/bluetooth/tests/marionette/manifest.ini]
[include:../../../../../dom/telephony/test/marionette/manifest.ini]
[include:../../../../../dom/voicemail/test/marionette/manifest.ini]
[include:../../../../../dom/battery/test/marionette/manifest.ini]
[include:../../../../../dom/mobilemessage/tests/marionette/manifest.ini]
[include:../../../../../dom/mobileconnection/tests/marionette/manifest.ini]
[include:../../../../../dom/system/gonk/tests/marionette/manifest.ini]
[include:../../../../../dom/icc/tests/marionette/manifest.ini]
--- a/testing/marionette/mach_commands.py
+++ b/testing/marionette/mach_commands.py
@@ -27,17 +27,17 @@ this by ommitting the VARIANT variable w
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,
+def run_marionette(tests, b2g_path=None, emulator=None,
address=None, binary=None, topsrcdir=None, **kwargs):
from mozlog.structured import commandline
from marionette.runtests import (
MarionetteTestRunner,
BaseMarionetteArguments,
MarionetteHarness
)
@@ -78,19 +78,16 @@ 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
--- a/testing/mozharness/configs/marionette/automation_emulator_config.py
+++ b/testing/mozharness/configs/marionette/automation_emulator_config.py
@@ -3,17 +3,16 @@
# off, Bug 1209180.
import os
HG_SHARE_BASE_DIR = "/builds/hg-shared"
config = {
# marionette options
- "test_type": "b2g",
"emulator": "arm",
"tooltool_cache": "/builds/tooltool_cache",
"test_manifest": "unit-tests.ini",
"vcs_share_base": HG_SHARE_BASE_DIR,
"exes": {
'python': '/tools/buildbot/bin/python',
'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
@@ -42,17 +41,16 @@ config = {
"https://blobupload.elasticbeanstalk.com",
],
"blob_uploader_auth_file": os.path.join(os.getcwd(), "oauth.txt"),
"suite_definitions": {
"gaiatest_desktop": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--gecko-log=%(gecko_log)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
@@ -63,46 +61,43 @@ config = {
],
"run_filename": "",
"testsdir": ""
},
"gaiatest_emulator": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_desktop": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--binary=%(binary)s",
"--address=%(address)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
@@ -110,17 +105,16 @@ config = {
},
"webapi_desktop": {
"options": [],
"run_filename": "",
"testsdir": ""
},
"webapi_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--symbols-path=%(symbols_path)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
--- a/testing/mozharness/configs/marionette/gaia_ui_test_prod_config.py
+++ b/testing/mozharness/configs/marionette/gaia_ui_test_prod_config.py
@@ -7,17 +7,16 @@ HG_SHARE_BASE_DIR = "/builds/hg-shared"
if platform.system().lower() == 'darwin':
xre_url = "https://api.pub.build.mozilla.org/tooltool/sha512/4d8d7a37d90c34a2a2fda3066a8fe85c189b183d05389cb957fc6fed31f10a6924e50c1b84488ff61c015293803f58a3aed5d4819374d04c8e0ee2b9e3997278"
else:
xre_url = "https://api.pub.build.mozilla.org/tooltool/sha512/dc9503b21c87b5a469118746f99e4f41d73888972ce735fa10a80f6d218086da0e3da525d9a4cd8e4ea497ec199fef720e4a525873d77a1af304ac505e076462"
config = {
# marionette options
- "test_type": "b2g",
"marionette_address": "localhost:2828",
"gaiatest": True,
"xre_url": xre_url,
"application": "b2g",
"vcs_share_base": HG_SHARE_BASE_DIR,
"exes": {
'python': '/tools/buildbot/bin/python',
@@ -50,17 +49,16 @@ config = {
"blob_uploader_auth_file": os.path.join(os.getcwd(), "oauth.txt"),
"vcs_output_timeout": 1760,
"tooltool_cache": "/builds/tooltool_cache",
"suite_definitions": {
"gaiatest_desktop": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--gecko-log=%(gecko_log)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
@@ -71,46 +69,43 @@ config = {
],
"run_filename": "",
"testsdir": ""
},
"gaiatest_emulator": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_desktop": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--binary=%(binary)s",
"--address=%(address)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
@@ -118,17 +113,16 @@ config = {
},
"webapi_desktop": {
"options": [],
"run_filename": "",
"testsdir": ""
},
"webapi_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--symbols-path=%(symbols_path)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
--- a/testing/mozharness/configs/marionette/prod_config.py
+++ b/testing/mozharness/configs/marionette/prod_config.py
@@ -1,16 +1,15 @@
# This is a template config file for marionette production.
import os
HG_SHARE_BASE_DIR = "/builds/hg-shared"
config = {
# marionette options
- "test_type": "browser",
"marionette_address": "localhost:2828",
"test_manifest": "unit-tests.ini",
"vcs_share_base": HG_SHARE_BASE_DIR,
"exes": {
'python': '/tools/buildbot/bin/python',
'virtualenv': ['/tools/buildbot/bin/python', '/tools/misc-python/virtualenv.py'],
'tooltool.py': "/tools/tooltool.py",
@@ -39,17 +38,16 @@ config = {
"download_symbols": "ondemand",
"download_minidump_stackwalk": True,
"tooltool_cache": "/builds/tooltool_cache",
"suite_definitions": {
"gaiatest_desktop": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--gecko-log=%(gecko_log)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
@@ -60,46 +58,43 @@ config = {
],
"run_filename": "",
"testsdir": ""
},
"gaiatest_emulator": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_desktop": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--binary=%(binary)s",
"--address=%(address)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
@@ -107,17 +102,16 @@ config = {
},
"webapi_desktop": {
"options": [],
"run_filename": "",
"testsdir": ""
},
"webapi_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--symbols-path=%(symbols_path)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
--- a/testing/mozharness/configs/marionette/test_config.py
+++ b/testing/mozharness/configs/marionette/test_config.py
@@ -1,29 +1,27 @@
# This is a template config file for marionette test.
config = {
# marionette options
- "test_type": "browser",
"marionette_address": "localhost:2828",
"test_manifest": "unit-tests.ini",
"default_actions": [
'clobber',
'download-and-extract',
'create-virtualenv',
'install',
'run-marionette',
],
"suite_definitions": {
"gaiatest_desktop": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--gecko-log=%(gecko_log)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
@@ -34,46 +32,43 @@ config = {
],
"run_filename": "",
"testsdir": ""
},
"gaiatest_emulator": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_desktop": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--binary=%(binary)s",
"--address=%(address)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
@@ -81,17 +76,16 @@ config = {
},
"webapi_desktop": {
"options": [],
"run_filename": "",
"testsdir": ""
},
"webapi_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--symbols-path=%(symbols_path)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
--- a/testing/mozharness/configs/marionette/windows_config.py
+++ b/testing/mozharness/configs/marionette/windows_config.py
@@ -1,15 +1,14 @@
# This is a template config file for marionette production on Windows.
import os
import sys
config = {
# marionette options
- "test_type": "browser",
"marionette_address": "localhost:2828",
"test_manifest": "unit-tests.ini",
"virtualenv_python_dll": 'c:/mozilla-build/python27/python27.dll',
"virtualenv_path": 'venv',
"exes": {
'python': 'c:/mozilla-build/python27/python',
'virtualenv': ['c:/mozilla-build/python27/python', 'c:/mozilla-build/buildbotve/virtualenv.py'],
@@ -41,17 +40,16 @@ config = {
"blob_uploader_auth_file" : os.path.join(os.getcwd(), "oauth.txt"),
"download_minidump_stackwalk": True,
"download_symbols": "ondemand",
"suite_definitions": {
"gaiatest_desktop": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--gecko-log=%(gecko_log)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
@@ -62,46 +60,43 @@ config = {
],
"run_filename": "",
"testsdir": ""
},
"gaiatest_emulator": {
"options": [
"--restart",
"--timeout=%(timeout)s",
- "--type=%(type)s",
"--testvars=%(testvars)s",
"--profile=%(profile)s",
"--symbols-path=%(symbols_path)s",
"--log-xunit=%(xml_output)s",
"--html-output=%(html_output)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_desktop": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--binary=%(binary)s",
"--address=%(address)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
"testsdir": ""
},
"marionette_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s",
"--symbols-path=%(symbols_path)s"
],
"run_filename": "",
@@ -109,17 +104,16 @@ config = {
},
"webapi_desktop": {
"options": [],
"run_filename": "",
"testsdir": ""
},
"webapi_emulator": {
"options": [
- "--type=%(type)s",
"--log-raw=%(raw_log_file)s",
"--log-errorsummary=%(error_summary_file)s",
"--symbols-path=%(symbols_path)s",
"--logcat-dir=%(logcat_dir)s",
"--emulator=%(emulator)s",
"--homedir=%(homedir)s"
],
"run_filename": "",
--- a/testing/mozharness/scripts/marionette.py
+++ b/testing/mozharness/scripts/marionette.py
@@ -60,23 +60,16 @@ class MarionetteTest(TestingMixin, Mercu
], [
["--gaia-branch"],
{"action": "store",
"dest": "gaia_branch",
"default": "default",
"help": "branch of gaia repo to clone"
}
], [
- ["--test-type"],
- {"action": "store",
- "dest": "test_type",
- "default": "browser",
- "help": "The type of tests to run",
- }
- ], [
["--marionette-address"],
{"action": "store",
"dest": "marionette_address",
"default": None,
"help": "The host:port of the Marionette server running inside Gecko. Unused for emulator testing",
}
], [
["--emulator"],
@@ -113,23 +106,16 @@ class MarionetteTest(TestingMixin, Mercu
], [
["--xre-url"],
{"action": "store",
"dest": "xre_url",
"default": None,
"help": "url of desktop xre archive"
}
], [
- ["--gip-suite"],
- {"action": "store",
- "dest": "gip_suite",
- "default": None,
- "help": "gip suite to be executed. If no value is provided, manifest tbpl-manifest.ini will be used. the See Bug 1046694"
- }
- ], [
["--total-chunks"],
{"action": "store",
"dest": "total_chunks",
"help": "Number of total chunks",
}
], [
["--this-chunk"],
{"action": "store",
@@ -325,17 +311,16 @@ class MarionetteTest(TestingMixin, Mercu
"""
dirs = self.query_abs_dirs()
raw_log_file = os.path.join(dirs['abs_blob_upload_dir'],
'marionette_raw.log')
error_summary_file = os.path.join(dirs['abs_blob_upload_dir'],
'marionette_errorsummary.log')
config_fmt_args = {
- 'type': self.config.get('test_type'),
# emulator builds require a longer timeout
'timeout': 60000 if self.config.get('emulator') else 10000,
'profile': os.path.join(dirs['abs_gaia_dir'], 'profile'),
'xml_output': os.path.join(dirs['abs_work_dir'], 'output.xml'),
'html_output': os.path.join(dirs['abs_blob_upload_dir'], 'output.html'),
'logcat_dir': dirs['abs_work_dir'],
'emulator': 'x86' if os.path.isdir(os.path.join(dirs['abs_b2g-distro_dir'], 'out',
'target', 'product', 'generic_x86')) else 'arm',
@@ -390,29 +375,16 @@ class MarionetteTest(TestingMixin, Mercu
binary_path = os.path.dirname(self.binary_path)
if os.access(os.path.join(binary_path, 'b2g-bin'), os.F_OK):
# first, try to find and use b2g-bin
config_fmt_args['binary'] = os.path.join(binary_path, 'b2g-bin')
else:
# if b2g-bin cannot be found we must use just b2g
config_fmt_args['binary'] = os.path.join(binary_path, 'b2g')
- # Bug 1046694
- # using a different manifest if a specific gip-suite is specified
- # --type parameter depends on gip-suite
- if self.config.get('gip_suite'):
- manifest = os.path.join(dirs['abs_gaiatest_dir'], 'gaiatest', 'tests', self.config.get('gip_suite'),
- 'manifest.ini')
- if self.config.get('gip_suite') == "functional":
- config_fmt_args['type'] = "b2g-external"
- else:
- # For <v2.2 branches using the old tbpl-manifest.ini and no split gip-suite
- manifest = os.path.join(dirs['abs_gaiatest_dir'], 'gaiatest', 'tests',
- 'tbpl-manifest.ini')
-
else:
# Marionette or Marionette-webapi tests
cmd = [python, '-u', os.path.join(dirs['abs_marionette_dir'],
'runtests.py')]
manifest = os.path.join(dirs['abs_marionette_tests_dir'],
self.config['test_manifest'])
--- a/toolkit/components/microformats/manifest.ini
+++ b/toolkit/components/microformats/manifest.ini
@@ -1,9 +1,7 @@
[DEFAULT]
-b2g = false
-browser = true
-qemu = false
+run-if = buildapp == 'browser'
[test/marionette/test_standards.py]
[test/marionette/test_modules.py]
[test/marionette/test_interface.py]