mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Log the start and the end of each test
This commit is contained in:
parent
af778cc509
commit
db6e417965
1 changed files with 19 additions and 1 deletions
|
@ -198,8 +198,10 @@ def pytest_configure(config):
|
|||
)
|
||||
# Make sure the test suite "knows" this is a pytest test run
|
||||
RUNTIME_VARS.PYTEST_SESSION = True
|
||||
# <---- Register Markers ---------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# ----- PyTest Tweaks ----------------------------------------------------------------------------------------------->
|
||||
def set_max_open_files_limits(min_soft=3072, min_hard=4096):
|
||||
|
||||
# Get current limits
|
||||
|
@ -255,7 +257,23 @@ def set_max_open_files_limits(min_soft=3072, min_hard=4096):
|
|||
def pytest_report_header():
|
||||
soft, hard = set_max_open_files_limits()
|
||||
return 'max open files; soft: {}; hard: {}'.format(soft, hard)
|
||||
# <---- Register Markers ---------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
def pytest_runtest_logstart(nodeid):
|
||||
'''
|
||||
implements the runtest_setup/call/teardown protocol for
|
||||
the given test item, including capturing exceptions and calling
|
||||
reporting hooks.
|
||||
'''
|
||||
log.debug('>>>>> START >>>>> %s', nodeid)
|
||||
|
||||
|
||||
def pytest_runtest_logfinish(nodeid):
|
||||
'''
|
||||
called after ``pytest_runtest_call``
|
||||
'''
|
||||
log.debug('<<<<< END <<<<<<< %s', nodeid)
|
||||
# <---- PyTest Tweaks ------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# ----- Test Setup -------------------------------------------------------------------------------------------------->
|
||||
|
|
Loading…
Add table
Reference in a new issue