firmware/testing
2019-11-20 17:17:32 -05:00
..
data Not sure why these are changing 2019-09-11 11:15:53 -04:00
debug Wider still 2019-06-13 08:47:37 -04:00
devtest Merge branch 'master' into mark3 2019-10-09 08:45:16 -04:00
.gitignore Cleanup gitignores; put closed to used directory 2018-11-26 09:00:01 -05:00
api.py Use bitcoin-core to be a partner in 2-of-2 w/ Coldcard 2019-05-31 14:44:56 -04:00
bech32.py Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
bip39-vectors.json BIP39 passphrase additions, no UX yet 2019-03-27 11:00:43 -04:00
ckcc_protocol Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
conftest.py Cleanups 2019-10-29 13:30:32 -04:00
constants.py Fix sciptPubKey data in fake multisig txns 2019-09-11 10:44:17 -04:00
helpers.py Test change outputs more completely 2019-09-06 10:58:06 -04:00
Makefile Add CLI test case for multisig 2019-05-21 10:07:51 -04:00
psbt.py Cleanup imports 2019-06-17 09:20:28 -04:00
pytest.ini Handle duplicated XFP values better 2019-05-17 13:19:37 -04:00
README.md Added more detail 2019-04-18 13:14:27 -04:00
requirements.txt BIP39 passphrase additions, no UX yet 2019-03-27 11:00:43 -04:00
test_addr.py Add CLI test case for multisig 2019-05-21 10:07:51 -04:00
test_address_explorer.py Update for warning/press 4 thing 2019-10-08 14:44:19 -04:00
test_attended.py Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
test_bip39pw.py More progress toward multisig 2019-05-23 12:56:43 -04:00
test_change_pins.py test pin changes while in duress/secondary wallet modes 2019-10-07 13:39:26 -04:00
test_export.py Add bitcoin core test case, update others 2019-11-20 10:58:36 -05:00
test_msg.py Refactor deriv path code, set max depth to 12 2019-10-28 11:23:38 -04:00
test_multisig.py Bugfix for adding signature to signed multisig psbt 2019-11-06 10:20:29 -05:00
test_paper.py Test code for paper wallets 2019-11-20 17:17:32 -05:00
test_pincodes.py Test UX for changing PIN codes, all of them 2019-10-01 16:00:34 -04:00
test_sign.py Test for coverage 2019-10-29 12:22:09 -04:00
test_unit.py Fix issue with right trim of zero 2019-08-26 09:20:10 -04:00
test_usb.py bugfix 2018-07-25 09:31:49 -04:00
test_ux.py Bugfix: backup files >2000 bytes failed verification check 2019-11-12 10:08:28 -05:00
test-wallet-backup.txt Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
xfp-miner.py Finalize 2019-05-16 13:45:00 -04:00

Testing Code

None of this code ships on the product itself, but it does get used for testing purposes.

Background

  • pytest is used to track test cases and fixtures, etc
  • most test code is desktop (simulator), but it can also validate stuff from/to the device
  • some tests might only be possible in 'devmode': a unit that has booted w/ non-standard bootrom
  • some tests may be destructive for funds/seeds/wallets
  • most unit tests will work only on simulator because the useful hooks are too dangerous in product
  • you need a testnet bitcoind running for some tests (will be skipped if not present)

Command line args

  • pass argument "--sim" or "--dev" to select simulator or real device

  • will skip tests that are inappropriate

  • and/or use "marker" for bitcoind interaction: "-m bitcoind"

  • with "--dev" include "--manual" to require operator to press X/OK at times (also needs -s), so:

    --dev --manual -s

PSBT reference files

  • examples with IN_REDEEM_SCRIPT:

    data/2-of-2.psbt data/failed-ex.psbt data/filled_scriptsig.psbt data/multisig-single.psbt data/p2pkh+p2sh+outs.psbt data/p2pkh-p2sh-p2wpkh.psbt data/p2sh_p2wpkh.psbt data/worked-*.psbt