Bug 1330598 - Skip Marionette's addon unit tests for Fennec." r=maja_zf
authorHenrik Skupin <mail@hskupin.info>
Thu, 12 Jan 2017 13:11:15 +0100
changeset 374293 181226e8933bf08a57f49faebcb9a32933bf13b9
parent 374292 9e88382126944a76c9eca6a768f5123952faf6a7
child 374294 9cb19aceacf0487e75b3792cdbe21e652fe3ead3
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaja_zf
bugs1330598
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1330598 - Skip Marionette's addon unit tests for Fennec." r=maja_zf The tests have to be skipped because Marionette server only allows the installation of add-ons for Firefox. Once Fennec gets white-listed, it would be still necessary to copy the to install XPI to the device file system. MozReview-Commit-ID: Jr53iCzkZvo
testing/marionette/harness/marionette_harness/tests/unit/test_addons.py
testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini
--- a/testing/marionette/harness/marionette_harness/tests/unit/test_addons.py
+++ b/testing/marionette/harness/marionette_harness/tests/unit/test_addons.py
@@ -1,29 +1,27 @@
 # 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/.
 
 import os
-import unittest
 
 from marionette_driver.addons import Addons, AddonInstallException
-
-from marionette_harness import MarionetteTestCase
+from marionette_harness import MarionetteTestCase, skip
 
 
 here = os.path.abspath(os.path.dirname(__file__))
 
 
 class TestAddons(MarionetteTestCase):
+
     def setUp(self):
         MarionetteTestCase.setUp(self)
         self.addons = Addons(self.marionette)
 
-
     @property
     def all_addon_ids(self):
         with self.marionette.using_context('chrome'):
             addons = self.marionette.execute_async_script("""
               Components.utils.import("resource://gre/modules/AddonManager.jsm");
               AddonManager.getAllAddons(function(addons){
                 let ids = addons.map(function(x) {
                   return x.id;
@@ -44,17 +42,17 @@ class TestAddons(MarionetteTestCase):
         self.assertNotIn(addon_id, self.all_addon_ids)
 
     def test_install_unsigned_addon(self):
         addon_path = os.path.join(here, 'mn-restartless-unsigned.xpi')
 
         with self.assertRaises(AddonInstallException):
             self.addons.install(addon_path)
 
-    @unittest.skip("need to get the test extension signed")
+    @skip("Need to get the test extension signed")
     def test_install_and_remove_signed_addon(self):
         addon_path = os.path.join(here, 'mn-restartless-signed.xpi')
 
         addon_id = self.addons.install(addon_path)
         self.assertIn(addon_id, self.all_addon_ids)
 
         self.addons.uninstall(addon_id)
         self.assertNotIn(addon_id, self.all_addon_ids)
--- a/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini
+++ b/testing/marionette/harness/marionette_harness/tests/unit/unit-tests.ini
@@ -119,13 +119,14 @@ skip-if = appname == 'fennec' || os == "
 [test_prefs.py]
 
 [test_shadow_dom.py]
 
 [test_chrome.py]
 skip-if = appname == 'fennec'
 
 [test_addons.py]
+skip-if = appname == 'fennec' # Bug 1330598
 
 [test_select.py]
 [test_crash.py]
 skip-if = manage_instance == false || appname == 'fennec' # Bug 1298921 and bug 1322993
 [test_localization.py]