mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-20 14:39:22 +00:00
chore(tests): do not generate index after every test, unconditionally
[no changelog]
This commit is contained in:
parent
508b6a87e6
commit
4b2b0e457b
@ -108,16 +108,16 @@ test_emu_click: ## run click tests
|
||||
|
||||
test_emu_ui: ## run ui integration tests
|
||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests $(TESTOPTS) \
|
||||
--ui=test --ui-check-missing --not-generate-report-after-each-test
|
||||
--ui=test --ui-check-missing
|
||||
|
||||
test_emu_ui_multicore: ## run ui integration tests using multiple cores
|
||||
$(PYTEST) -n auto $(TESTPATH)/device_tests $(TESTOPTS) \
|
||||
--ui=test --ui-check-missing --not-generate-report-after-each-test \
|
||||
--ui=test --ui-check-missing \
|
||||
--control-emulators --model=core --random-order-seed=$(shell echo $$RANDOM)
|
||||
|
||||
test_emu_ui_record: ## record and hash screens for ui integration tests
|
||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests $(TESTOPTS) \
|
||||
--ui=record --ui-check-missing --not-generate-report-after-each-test
|
||||
--ui=record --ui-check-missing
|
||||
|
||||
test_emu_ui_record_multicore: ## quickly record all screens
|
||||
make test_emu_ui_multicore || echo "All errors are recorded in fixtures.json"
|
||||
|
@ -351,13 +351,6 @@ def pytest_addoption(parser: "Parser") -> None:
|
||||
help="Which emulator to use: 'core' or 'legacy'. "
|
||||
"Only valid in connection with `--control-emulators`",
|
||||
)
|
||||
parser.addoption(
|
||||
"--not-generate-report-after-each-test",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Not generating HTML reports after each test case. "
|
||||
"Useful for CI tests to speed them up.",
|
||||
)
|
||||
|
||||
|
||||
def pytest_configure(config: "Config") -> None:
|
||||
@ -398,21 +391,6 @@ def pytest_runtest_setup(item: pytest.Item) -> None:
|
||||
pytest.skip("Skipping altcoin test")
|
||||
|
||||
|
||||
def pytest_runtest_teardown(item: pytest.Item) -> None:
|
||||
"""Called after a test item finishes.
|
||||
|
||||
Dumps the current UI test report HTML.
|
||||
"""
|
||||
# Not calling `testreport.generate_reports()` not to generate
|
||||
# the `all_screens` report, as would take a lot of time.
|
||||
# That will be generated in `pytest_sessionfinish`.
|
||||
|
||||
# Optionally generating `index.html` report unless turned off by `pytest` flag
|
||||
if not item.session.config.getoption("not_generate_report_after_each_test"):
|
||||
if item.session.config.getoption("ui"):
|
||||
testreport.index()
|
||||
|
||||
|
||||
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
||||
def pytest_runtest_makereport(item: pytest.Item, call) -> None:
|
||||
# Make test results available in fixtures.
|
||||
|
Loading…
Reference in New Issue
Block a user