args.ledger = True if args.ledger is None else args.ledger else: # Default all false unless overridden args.trezor = False if args.trezor is None else args.trezor args.trezor_t = False if args.trezor_t is None else args.trezor_t args.coldcard = False if args.coldcard is None else args.coldcard args.keepkey = False if args.keepkey is None else args.keepkey args.bitbox = False if args.bitbox is None else args.bitbox args.ledger = False if args.ledger is None else args.ledger if args.trezor or args.trezor_t or args.coldcard or args.ledger or args.keepkey or args.bitbox: # Start bitcoind rpc, userpass = start_bitcoind(args.bitcoind) if success and args.bitbox: success &= digitalbitbox_test_suite(args.bitbox_path, rpc, userpass, args.interface) if success and args.coldcard: success &= coldcard_test_suite(args.coldcard_path, rpc, userpass, args.interface) if success and args.trezor: success &= trezor_test_suite(args.trezor_path, rpc, userpass, args.interface) if success and args.trezor_t: success &= trezor_test_suite(args.trezor_t_path, rpc, userpass, args.interface, True) if success and args.keepkey: success &= keepkey_test_suite(args.keepkey_path, rpc, userpass, args.interface) if success and args.ledger: success &= ledger_test_suite(args.ledger_path, rpc, userpass, args.interface)
suite.addTests( unittest.defaultTestLoader.loadTestsFromTestCase(TestDescriptor)) suite.addTests( unittest.defaultTestLoader.loadTestsFromTestCase(TestSegwitAddress)) suite.addTests(unittest.defaultTestLoader.loadTestsFromTestCase(TestPSBT)) if sys.platform.startswith("linux"): suite.addTests( unittest.defaultTestLoader.loadTestsFromTestCase( TestUdevRulesInstaller)) if not args.no_trezor or not args.no_coldcard or args.ledger or not args.no_bitbox or not args.no_keepkey: # Start bitcoind rpc, userpass = start_bitcoind(args.bitcoind) if not args.no_trezor: suite.addTest(trezor_test_suite(args.trezor, rpc, userpass, args.interface)) if not args.no_coldcard: suite.addTest( coldcard_test_suite(args.coldcard, rpc, userpass, args.interface)) if args.ledger: suite.addTest(ledger_test_suite(rpc, userpass, args.interface)) if not args.no_bitbox: suite.addTest( digitalbitbox_test_suite(rpc, userpass, args.bitbox, args.interface)) if not args.no_keepkey: suite.addTest( keepkey_test_suite(args.keepkey, rpc, userpass, args.interface)) result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(suite) sys.exit(not result.wasSuccessful())
args.bitbox = True if args.bitbox is None else args.bitbox args.ledger = True if args.ledger is None else args.ledger else: # Default all false unless overridden args.trezor = False if args.trezor is None else args.trezor args.trezor_t = False if args.trezor_t is None else args.trezor_t args.coldcard = False if args.coldcard is None else args.coldcard args.keepkey = False if args.keepkey is None else args.keepkey args.bitbox = False if args.bitbox is None else args.bitbox args.ledger = False if args.ledger is None else args.ledger if args.trezor or args.trezor_t or args.coldcard or args.ledger or args.keepkey or args.bitbox: # Start bitcoind rpc, userpass = start_bitcoind(args.bitcoind) if args.bitbox: suite.addTest(digitalbitbox_test_suite(args.bitbox_path, rpc, userpass, args.interface)) if args.coldcard: suite.addTest(coldcard_test_suite(args.coldcard_path, rpc, userpass, args.interface)) if args.trezor: suite.addTest(trezor_test_suite(args.trezor_path, rpc, userpass, args.interface)) if args.trezor_t: suite.addTest(trezor_test_suite(args.trezor_t_path, rpc, userpass, args.interface, True)) if args.keepkey: suite.addTest(keepkey_test_suite(args.keepkey_path, rpc, userpass, args.interface)) if args.ledger: suite.addTest(ledger_test_suite(args.ledger_path, rpc, userpass, args.interface)) result = unittest.TextTestRunner(stream=sys.stdout, verbosity=2).run(suite) sys.exit(not result.wasSuccessful())
# Default all false unless overridden args.trezor_1 = False if args.trezor_1 is None else args.trezor_1 args.trezor_t = False if args.trezor_t is None else args.trezor_t args.coldcard = False if args.coldcard is None else args.coldcard args.keepkey = False if args.keepkey is None else args.keepkey args.bitbox01 = False if args.bitbox01 is None else args.bitbox01 args.ledger = False if args.ledger is None else args.ledger args.ledger_legacy = False if args.ledger_legacy is None else args.ledger_legacy args.jade = False if args.jade is None else args.jade if args.trezor_1 or args.trezor_t or args.coldcard or args.ledger or args.ledger_legacy or args.keepkey or args.bitbox01 or args.jade: # Start bitcoind bitcoind = Bitcoind.create(args.bitcoind) if success and args.bitbox01: success &= digitalbitbox_test_suite(args.bitbox01_path, bitcoind, args.interface) if success and args.coldcard: success &= coldcard_test_suite(args.coldcard_path, bitcoind, args.interface) if success and args.trezor_1: success &= trezor_test_suite(args.trezor_1_path, bitcoind, args.interface, '1') if success and args.trezor_t: success &= trezor_test_suite(args.trezor_t_path, bitcoind, args.interface, 't') if success and args.keepkey: success &= keepkey_test_suite(args.keepkey_path, bitcoind, args.interface) if success and args.ledger: success &= ledger_test_suite(args.ledger_path, bitcoind, args.interface, False) if success and args.ledger_legacy: success &= ledger_test_suite(args.ledger_path, bitcoind, args.interface, True) if success and args.jade: success &= jade_test_suite(args.jade_path, bitcoind, args.interface)