1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-04 21:48:17 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
grdddj
0f549c02da feat(core): add -r option to emu.py to allow for screen recording
[no changelog]
2022-10-12 13:44:53 +02:00
grdddj
5671bd037b chore(core): add type hints to emu.py 2022-05-25 16:12:47 +02:00
Pavol Rusnak
edb87359eb feat(core): headless emulator implies disabled animations
[no changelog]
2022-03-18 11:58:04 +01:00
grdddj
5d76144ef5 chore(common): always use resolve() when accessing parent of the Path
[no changelog]
2022-02-07 14:05:27 +01:00
matejcik
25385af159 feat(core/emu.py): erase profile when running emu.py -e 2021-05-06 13:14:21 +02:00
Pavol Rusnak
50fdd183c2
ci: enable editorconfig checks, fix whitespace issues 2020-11-11 14:43:50 +01:00
Martin Milata
c89a8b7bd5 ci(core): add memory profiler job 2020-11-02 14:14:00 +01:00
Pavol Rusnak
063aba910d core: rename emulator to trezor-emu-core 2020-07-30 15:27:34 +02:00
matejcik
72cde5a57d core: disallow parsing options after command (fixes #951) 2020-04-16 11:24:15 +02:00
matejcik
5bd8d9b5bb core/sdcard: make allocating new SD card for emulator fast 2020-02-20 12:51:48 +01:00
matejcik
1d41141a1f core/emulator: properly ignore inotify problems (fixes #854) 2020-02-17 12:33:38 +01:00
matejcik
4c8c96272c emu: fix flag options with defaults
Click REALLY INSISTS you provide on/off switches for your options.
You can use is_flag, but then the presence of the option changes based
on the default value.

Which makes sense, really:
@option("-f", "foobar", is_flag=True, default=False)
you would expect `./cli -f` to have `foobar is True`

whereas with
@option("-f", "foobar", is_flag=True, default=True)
you would expect `./cli -f` to have `foobar is False`, otherwise it's a
no-op

this becomes fun with `default=os.environ.get("SOMETHING")`, because
then the effect of the option CHANGES with a value of environment
variable!

there's two ways around this:
a) don't use defaults, update the flag explicitly, like:
   foobar = foobar or os.environ.get("FOOBAR") == "1"
b) forget about is_flag and specify an on/off switch, where the default
   value works as intended

since the latter is also technically speaking more correct, i'm doing it
2020-02-12 13:32:05 +01:00
matejcik
271da3fa39 python: add detailed logging to emulator runner 2020-02-12 13:31:58 +01:00
Tomas Susanka
4850eaf534 emu.py: remove frozen variable 2020-01-30 14:47:11 +00:00
matejcik
a3d309eca2 core/prof: make sure coverage data is generated with absolute paths 2020-01-23 18:43:20 +01:00
matejcik
8dce2cf98c core: introduce emulator runner (fixes #466) 2020-01-23 18:43:20 +01:00