From 8814837a9ef3f960165febcb5b87bbea677330b6 Mon Sep 17 00:00:00 2001 From: matejcik Date: Mon, 9 Sep 2019 16:03:32 +0200 Subject: [PATCH] ci: split "test upgrade" for core and legacy (fixes #501) --- ci/test.yml | 36 +++++++++++-------- tests/upgrade_tests/test_firmware_upgrades.py | 4 +++ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/ci/test.yml b/ci/test.yml index c9cc4b130..05d127c04 100644 --- a/ci/test.yml +++ b/ci/test.yml @@ -68,6 +68,17 @@ core unix monero test: - cd core - pipenv run make test_emu_monero +core unix upgrade test: + stage: test + <<: *only_changes_core + dependencies: + - core unix frozen debug build + variables: + TREZOR_UPGRADE_TEST: "core" + script: + - tests/upgrade_tests/download_emulators.sh + - pipenv run pytest tests/upgrade_tests + # Crypto @@ -114,6 +125,17 @@ legacy emu btconly test: - cd legacy - pipenv run script/test +legacy emu upgrade test: + stage: test + <<: *only_changes_legacy + dependencies: + - legacy emu regular build + variables: + TREZOR_UPGRADE_TEST: "legacy" + script: + - tests/upgrade_tests/download_emulators.sh + - pipenv run pytest tests/upgrade_tests + # Python @@ -142,17 +164,3 @@ storage test: - cd storage/tests - pipenv run make build - pipenv run make tests_all - - -# Other - -upgrade test: - stage: test - <<: *only_changes_core - <<: *only_changes_legacy - dependencies: - - core unix frozen debug build - - legacy emu regular build - script: - - tests/upgrade_tests/download_emulators.sh - - pipenv run pytest tests/upgrade_tests diff --git a/tests/upgrade_tests/test_firmware_upgrades.py b/tests/upgrade_tests/test_firmware_upgrades.py index e33bca1eb..0cc67133e 100644 --- a/tests/upgrade_tests/test_firmware_upgrades.py +++ b/tests/upgrade_tests/test_firmware_upgrades.py @@ -69,8 +69,12 @@ def for_all(*args, minimum_version=(1, 0, 0)): if not args: args = ("core", "legacy") + enabled_gens = os.environ.get("TREZOR_UPGRADE_TEST", "").split(",") + all_params = [] for gen in args: + if gen not in enabled_gens: + continue try: to_tag = LOCAL_BUILDS[gen] from_tags = ALL_TAGS[gen] + [to_tag]