Bug 1076810 - fix mozharness nosetests failures,r=mgerva
authorPeter Moore <pmoore@mozilla.com>
Mon, 24 Nov 2014 15:20:16 +0100 (2014-11-24)
changeset 3411 9475991241fc6c06f41432c2af86bf488911a94f
parent 3409 6c660d6a19de16ddd250853e8e14c6cef16f7f18
child 3412 96810ab51f0d26852bb5f63a15a97f74ade0e36b
push id2638
push userpmoore@mozilla.com
push dateMon, 24 Nov 2014 14:20:20 +0000 (2014-11-24)
reviewersmgerva
bugs1076810
Bug 1076810 - fix mozharness nosetests failures,r=mgerva
mozharness/mozilla/testing/testbase.py
--- a/mozharness/mozilla/testing/testbase.py
+++ b/mozharness/mozilla/testing/testbase.py
@@ -7,16 +7,18 @@
 
 import copy
 import os
 import platform
 import re
 import urllib2
 import getpass
 
+from nose.tools import nottest
+
 from mozharness.base.config import ReadOnlyDict, parse_config_file
 from mozharness.base.errors import BaseErrorList
 from mozharness.base.log import FATAL
 from mozharness.base.python import (
     ResourceMonitoringMixin,
     VirtualenvMixin,
     virtualenv_config_options,
 )
@@ -398,16 +400,17 @@ 2. running via buildbot and running the 
     def structured_output(self, suite_category):
         """Defines whether structured logging is in use in this configuration. This
         may need to be replaced with data from a different config at the resolution
         of bug 1070041 and related bugs.
         """
         return ('structured_suites' in self.tree_config and
                 suite_category in self.tree_config['structured_suites'])
 
+    @nottest
     def get_test_output_parser(self, suite_category, strict=False,
                                fallback_parser_class=DesktopUnittestOutputParser,
                                **kwargs):
         """Derive and return an appropriate output parser, either the structured
         output parser or a fallback based on the type of logging in use as determined by
         configuration.
         """
         if not self.structured_output(suite_category):
@@ -578,27 +581,29 @@ Did you run with --create-virtualenv? Is
                 cmd = [x % (self.buildbot_config.get('properties'))
                        for x in cmd]
             self.run_command(cmd,
                              cwd=dirs['abs_work_dir'],
                              error_list=BaseErrorList,
                              halt_on_failure=suite['halt_on_failure'],
                              fatal_exit_code=suite.get('fatal_exit_code', 3))
 
+    @nottest
     def preflight_run_tests(self):
         """preflight commands for all tests"""
         # If the in tree config hasn't been loaded by a previous step, load it here.
         if len(self.tree_config) == 0:
             self._read_tree_config()
 
         c = self.config
         if c.get('run_cmd_checks_enabled'):
             self._run_cmd_checks(c.get('preflight_run_cmd_suites', []))
         elif c.get('preflight_run_cmd_suites'):
             self.warning("Proceeding without running prerun test commands."
                          " These are often OS specific and disabling them may"
                          " result in spurious test results!")
 
+    @nottest
     def postflight_run_tests(self):
         """preflight commands for all tests"""
         c = self.config
         if c.get('run_cmd_checks_enabled'):
             self._run_cmd_checks(c.get('postflight_run_cmd_suites', []))