зеркало из https://github.com/mozilla/gecko-dev.git
4168a526cd
Add the `pytest_mozlog` module (from https://github.com/davehunt/pytest-mozlog) to mozbase/mozlog/mozlog, so that we can use it in the logging of the Marionette harness tests. Add an entry point for the plugin to mozlog/setup.py so that when mozlog is installed, pytest will register the pytest_mozlog plugin.py module as the plugin 'mozlog'. Make the following modifications to pytest_mozlog/plugin.py: - Disable stdout logging by default in pytest-mozlog In the pytest-mozlog plugin, disable logging to stdout by default when setting up the mozlog logger, so that the default output seen when using the plugin is just the Pytest terminal output. The user can specify a mozlog logger to write to stdout by using the '--log-* -' option, in which case both Pytest and pytest-mozlog will log to stdout. - Record error msg and lineno in pytest-mozlog logs Extract the error message and line number for tests with failures/ errors from the Pytest test report, and pass these to the Mozlog logs output by the pytest-mozlog plugin. For skipped tests, pass the skip reason, and for unexpected passes allow Mozlog to report its default message "expected FAIL". - Report collected item count in pytest-mozlog Add/modify Pytest hooks in the pytest-mozlog plugin so that the suite_start event sent to the logger contains the correct list of tests to be run, i.e. items collected by Pytest, instead of an empty list. This allows mozlog to log the correct number of tests to be run. - Log skipped/xfailed tests with corresponding status (not 'PASS') Log skipped tests with status 'SKIP' and expected failures that do indeed fail with status 'FAIL'/expected 'FAIL' so that these can be distinguished from true passing tests. - Pass parsed arguments directly to mozlog.commandline.setup_logging Pass the entire Pytest config's argument namespace to `setup_logging` instead of copying over only the non-None formatters/formatter option arguments. Use the new `allow_unused_options` parameter to stop Mozlog from raising an error about options for unused formatters. MozReview-Commit-ID: 4WpprytS5cI --HG-- extra : rebase_source : 409de7a89e860471870e3adfd7634bc06f6e1873 |
||
---|---|---|
.. | ||
docs | ||
manifestparser | ||
mozcrash | ||
mozdebug | ||
mozdevice | ||
mozfile | ||
mozhttpd | ||
mozinfo | ||
mozinstall | ||
mozleak | ||
mozlog | ||
moznetwork | ||
mozprocess | ||
mozprofile | ||
mozrunner | ||
mozscreenshot | ||
mozsystemmonitor | ||
moztest | ||
mozversion | ||
README.md | ||
moz.build | ||
packages.txt | ||
setup_development.py | ||
test-manifest.ini | ||
test.py | ||
versioninfo.py |
README.md
Mozbase
Mozbase is a set of easy-to-use Python packages forming a supplemental standard library for Mozilla. It provides consistency and reduces redundancy in automation and other system-level software. All of Mozilla's test harnesses use mozbase to some degree, including Talos, mochitest, reftest, Autophone, and Eideticker.
Learn more about mozbase at the project page.
Read detailed docs online, or build them locally by running "make html" in the docs directory.