[CIs] Better reports everywhere (#8275)

* make it possible to invoke testconf.py in both test suites without crashing on having the same option added

* perl -pi -e 's|--make_reports|--make-reports|' to be consistent with other opts

* add `pytest --make-reports` to all CIs (and artifacts)

* fix
This commit is contained in:
Stas Bekman
2020-11-03 13:57:12 -08:00
committed by GitHub
parent 7f556d2e39
commit 1bb4bba53c
6 changed files with 144 additions and 59 deletions

View File

@@ -17,17 +17,14 @@ warnings.simplefilter(action="ignore", category=FutureWarning)
def pytest_addoption(parser):
parser.addoption(
"--make_reports",
action="store",
default=False,
help="generate report files - the value will be used as a `report_`+val+`reportname.txt`",
)
from transformers.testing_utils import pytest_addoption_shared
pytest_addoption_shared(parser)
def pytest_terminal_summary(terminalreporter):
from transformers.testing_utils import pytest_terminal_summary_main
make_reports = terminalreporter.config.getoption("--make_reports")
make_reports = terminalreporter.config.getoption("--make-reports")
if make_reports:
pytest_terminal_summary_main(terminalreporter, id=make_reports)