1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 20:19:23 +00:00
trezor-firmware/tests/config.py
slush0 98868b15a6 Added bip32 speed test
Fixed some unit tests
2014-02-04 16:12:52 +01:00

43 lines
1.1 KiB
Python

import sys
sys.path = ['../',] + sys.path
from trezorlib.transport_pipe import PipeTransport
from trezorlib.transport_hid import HidTransport
from trezorlib.transport_socket import SocketTransportClient
use_real = True
use_pipe = False
if use_real:
devices = HidTransport.enumerate()
TRANSPORT = HidTransport
TRANSPORT_ARGS = (devices[0],)
TRANSPORT_KWARGS = {'debug_link': False}
DEBUG_TRANSPORT = HidTransport
DEBUG_TRANSPORT_ARGS = (devices[0],)
DEBUG_TRANSPORT_KWARGS = {'debug_link': True}
elif use_pipe:
TRANSPORT = PipeTransport
TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor', False)
TRANSPORT_KWARGS = {}
DEBUG_TRANSPORT = PipeTransport
DEBUG_TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor_debug', False)
DEBUG_TRANSPORT_KWARGS = {}
else:
devices = HidTransport.enumerate()
TRANSPORT = HidTransport
TRANSPORT_ARGS = (devices[0][0],)
TRANSPORT_KWARGS = {'debug_link': False}
DEBUG_TRANSPORT = SocketTransportClient
DEBUG_TRANSPORT_ARGS = ('trezor.bo:2000', )
# DEBUG_TRANSPORT_ARGS = ('trezor.dyn:2000')
DEBUG_TRANSPORT_KWARGS = {}