Bug 1050855 - Remove --log-file and --file-level options. r=ahal

This commit is contained in:
Ahmed Kachkach 2014-08-15 15:42:00 -04:00
parent e9584c378a
commit 59d9c8247c
4 changed files with 11 additions and 24 deletions

View File

@ -61,14 +61,6 @@ class MochitestOptions(optparse.OptionParser):
"help": "absolute path to directory containing certificate store to use testing profile",
"default": os.path.join(build_obj.topsrcdir, 'build', 'pgo', 'certs') if build_obj is not None else None,
}],
[["--log-file"],
{ "action": "store",
"type": "string",
"dest": "logFile",
"metavar": "FILE",
"help": "file to which logging occurs",
"default": "",
}],
[["--autorun"],
{ "action": "store_true",
"dest": "autorun",
@ -121,17 +113,6 @@ class MochitestOptions(optparse.OptionParser):
"logging" % LEVEL_STRING,
"default": None,
}],
[["--file-level"],
{ "action": "store",
"type": "choice",
"dest": "fileLevel",
"choices": LOG_LEVELS,
"metavar": "LEVEL",
"help": "one of %s to determine the level of file "
"logging if a file has been specified, defaulting "
"to INFO" % LEVEL_STRING,
"default": "INFO",
}],
[["--chrome"],
{ "action": "store_true",
"dest": "chrome",

View File

@ -481,6 +481,11 @@ class MochitestUtilsMixin(object):
repeat -- How many times to repeat the test, ie: repeat=1 will run the test twice.
"""
if not hasattr(options, 'logFile'):
options.logFile = ""
if not hasattr(options, 'fileLevel'):
options.fileLevel = 'INFO'
# allow relative paths for logFile
if options.logFile:
options.logFile = self.getLogFilePath(options.logFile)

View File

@ -370,6 +370,7 @@ class MochiRemote(Mochitest):
def buildURLOptions(self, options, env):
self.localLog = options.logFile
options.logFile = self.remoteLog
options.fileLevel = 'INFO'
options.profilePath = self.localProfile
env["MOZ_HIDE_RESULTS_TABLE"] = "1"
retVal = Mochitest.buildURLOptions(self, options, env)

View File

@ -30,7 +30,7 @@ endif
RUN_MOCHITEST_B2G_DESKTOP = \
rm -f ./$@.log && \
$(PYTHON) _tests/testing/mochitest/runtestsb2g.py --autorun --close-when-done \
--console-level=INFO --log-file=./$@.log --file-level=INFO \
--console-level=INFO --log-tbpl=./$@.log \
--desktop --profile ${GAIA_PROFILE_DIR} \
--failure-file=$(abspath _tests/testing/mochitest/makefailures.json) \
$(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
@ -38,7 +38,7 @@ RUN_MOCHITEST_B2G_DESKTOP = \
RUN_MOCHITEST = \
rm -f ./$@.log && \
$(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done \
--console-level=INFO --log-file=./$@.log --file-level=INFO \
--console-level=INFO --log-tbpl=./$@.log \
--failure-file=$(abspath _tests/testing/mochitest/makefailures.json) \
--testing-modules-dir=$(abspath _tests/modules) \
--extra-profile-file=$(DIST)/plugins \
@ -47,7 +47,7 @@ RUN_MOCHITEST = \
RERUN_MOCHITEST = \
rm -f ./$@.log && \
$(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done \
--console-level=INFO --log-file=./$@.log --file-level=INFO \
--console-level=INFO --log-tbpl=./$@.log \
--run-only-tests=makefailures.json \
--testing-modules-dir=$(abspath _tests/modules) \
--extra-profile-file=$(DIST)/plugins \
@ -56,7 +56,7 @@ RERUN_MOCHITEST = \
RUN_MOCHITEST_REMOTE = \
rm -f ./$@.log && \
$(PYTHON) _tests/testing/mochitest/runtestsremote.py --autorun --close-when-done \
--console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
--console-level=INFO --log-tbpl=./$@.log $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
--app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
--testing-modules-dir=$(abspath _tests/modules) \
$(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
@ -67,7 +67,7 @@ RUN_MOCHITEST_ROBOCOP = \
--robocop-apk=$(DEPTH)/build/mobile/robocop/robocop-debug.apk \
--robocop-ids=$(DEPTH)/mobile/android/base/fennec_ids.txt \
--robocop-ini=$(DEPTH)/build/mobile/robocop/robocop.ini \
--console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
--console-level=INFO --log-tbpl=./$@.log $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
--app=$(TEST_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
$(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)