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

43 lines
1.1 KiB
Python
Raw Normal View History

2012-11-15 20:05:57 +00:00
import sys
sys.path = ['../',] + sys.path
2013-09-13 03:28:56 +00:00
from trezorlib.transport_pipe import PipeTransport
from trezorlib.transport_hid import HidTransport
from trezorlib.transport_socket import SocketTransportClient
2012-11-15 20:05:57 +00:00
use_real = True
use_pipe = False
2014-01-20 12:21:49 +00:00
if use_real:
devices = HidTransport.enumerate()
TRANSPORT = HidTransport
TRANSPORT_ARGS = (devices[0],)
2014-01-20 12:21:49 +00:00
TRANSPORT_KWARGS = {'debug_link': False}
DEBUG_TRANSPORT = HidTransport
DEBUG_TRANSPORT_ARGS = (devices[0],)
2014-01-20 12:21:49 +00:00
DEBUG_TRANSPORT_KWARGS = {'debug_link': True}
elif use_pipe:
2013-10-08 18:34:38 +00:00
TRANSPORT = PipeTransport
TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor', False)
2014-01-20 12:21:49 +00:00
TRANSPORT_KWARGS = {}
2013-10-08 18:34:38 +00:00
DEBUG_TRANSPORT = PipeTransport
DEBUG_TRANSPORT_ARGS = ('../../trezor-emu/pipe.trezor_debug', False)
2014-01-20 12:21:49 +00:00
DEBUG_TRANSPORT_KWARGS = {}
2012-11-15 20:05:57 +00:00
2013-10-08 18:34:38 +00:00
else:
2014-01-20 12:21:49 +00:00
devices = HidTransport.enumerate()
2013-10-08 18:34:38 +00:00
TRANSPORT = HidTransport
2014-02-05 21:15:05 +00:00
TRANSPORT_ARGS = (devices[0],)
2014-01-20 12:21:49 +00:00
TRANSPORT_KWARGS = {'debug_link': False}
2013-10-08 18:34:38 +00:00
DEBUG_TRANSPORT = SocketTransportClient
2014-01-20 12:21:49 +00:00
DEBUG_TRANSPORT_ARGS = ('trezor.bo:2000', )
# DEBUG_TRANSPORT_ARGS = ('trezor.dyn:2000')
DEBUG_TRANSPORT_KWARGS = {}