mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-16 17:42:02 +00:00
tests: drop skip_ui support
This commit is contained in:
parent
d979efc3ca
commit
abc593d19a
@ -100,10 +100,10 @@ test_emu_click: ## run click tests
|
||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/click_tests $(TESTOPTS)
|
||||
|
||||
test_emu_ui: ## run ui integration tests
|
||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests --ui=test --ui-check-missing -m "not skip_ui" $(TESTOPTS)
|
||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests --ui=test --ui-check-missing $(TESTOPTS)
|
||||
|
||||
test_emu_ui_record: ## record and hash screens for ui integration tests
|
||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests --ui=record --ui-check-missing -m "not skip_ui" $(TESTOPTS)
|
||||
$(EMU_TEST) $(PYTEST) $(TESTPATH)/device_tests --ui=record --ui-check-missing $(TESTOPTS)
|
||||
|
||||
pylint: ## run pylint on application sources and tests
|
||||
pylint -E $(shell find src tests -name *.py)
|
||||
|
@ -41,12 +41,6 @@ If you wish to check that all test cases in `fixtures.json` were used set the `-
|
||||
pytest tests/device_tests --ui=test --ui-check-missing
|
||||
```
|
||||
|
||||
You can also skip tests marked as `skip_ui`.
|
||||
|
||||
```sh
|
||||
pytest tests/device_tests --ui=test -m "not skip_ui"
|
||||
```
|
||||
|
||||
# Updating Fixtures ("Recording")
|
||||
|
||||
Short version:
|
||||
|
@ -96,7 +96,6 @@ def client(request: pytest.FixtureRequest, _raw_client: Client) -> Client:
|
||||
)
|
||||
|
||||
test_ui = request.config.getoption("ui")
|
||||
run_ui_tests = not request.node.get_closest_marker("skip_ui") and test_ui
|
||||
|
||||
_raw_client.reset_debug_features()
|
||||
_raw_client.open()
|
||||
@ -106,7 +105,7 @@ def client(request: pytest.FixtureRequest, _raw_client: Client) -> Client:
|
||||
request.session.shouldstop = "Failed to communicate with Trezor"
|
||||
pytest.fail("Failed to communicate with Trezor")
|
||||
|
||||
if run_ui_tests:
|
||||
if test_ui:
|
||||
# we need to reseed before the wipe
|
||||
_raw_client.debug.reseed(0)
|
||||
|
||||
@ -153,7 +152,7 @@ def client(request: pytest.FixtureRequest, _raw_client: Client) -> Client:
|
||||
|
||||
_raw_client.clear_session()
|
||||
|
||||
if run_ui_tests:
|
||||
if test_ui:
|
||||
with ui_tests.screen_recording(_raw_client, request):
|
||||
yield _raw_client
|
||||
else:
|
||||
@ -249,9 +248,6 @@ def pytest_configure(config: "Config") -> None:
|
||||
"markers",
|
||||
'setup_client(mnemonic="all all all...", pin=None, passphrase=False, uninitialized=False): configure the client instance',
|
||||
)
|
||||
config.addinivalue_line(
|
||||
"markers", "skip_ui: skip UI integration checks for this test"
|
||||
)
|
||||
with open(os.path.join(os.path.dirname(__file__), "REGISTERED_MARKERS")) as f:
|
||||
for line in f:
|
||||
config.addinivalue_line("markers", line.strip())
|
||||
|
Loading…
Reference in New Issue
Block a user