1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

ci: simplify running defs checks

This commit is contained in:
matejcik 2019-05-13 17:57:29 +02:00
parent 9b168daa19
commit fbd6e435b8
3 changed files with 10 additions and 9 deletions

View File

@ -39,3 +39,10 @@ cstyle_check: ## run code style check on low-level C code
cstyle: ## apply code style on low-level C code cstyle: ## apply code style on low-level C code
@echo [CLANG-FORMAT] @echo [CLANG-FORMAT]
@clang-format -i $(C_FILES) @clang-format -i $(C_FILES)
defs_check: ## check validity of coin definitions and protobuf files
jsonlint common/defs/*.json common/defs/*/*.json
python3 common/tools/cointool.py check
python3 common/tools/support.py check --ignore-missing
python3 common/protob/check.py
python3 common/protob/graph.py common/protob/*.proto

View File

@ -9,10 +9,4 @@ prebuild style:
prebuild common: prebuild common:
stage: prebuild stage: prebuild
script: script:
- cd common - pipenv run make defs_check
- pipenv run jsonlint defs/*.json
- pipenv run jsonlint defs/*/*.json
- pipenv run python tools/cointool.py check
- pipenv run python tools/support.py check --ignore-missing
- pipenv run python protob/check.py
- pipenv run python protob/graph.py protob/*.proto # TODO: artifacts?

View File

@ -184,9 +184,9 @@ def check_eth(coins):
print_log(logging.ERROR, chain_name_str, bucket_str) print_log(logging.ERROR, chain_name_str, bucket_str)
check_passed = False check_passed = False
for coin in coins: for coin in coins:
icon_file = "defs/ethereum/%s.png" % coin["shortcut"].lower() icon_file = coin["shortcut"].lower() + ".png"
try: try:
icon = Image.open(icon_file) icon = Image.open(os.path.join(coin_info.DEFS_DIR, "ethereum", icon_file))
except Exception: except Exception:
print(coin["key"], ": failed to open icon file", icon_file) print(coin["key"], ": failed to open icon file", icon_file)
check_passed = False check_passed = False