Bug 1076810 - fix mozharness nosetests failures,r=mgerva
--- 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', []))