firmware/testing
2021-03-12 09:58:27 -05:00
..
data missed file 2021-01-07 09:38:24 -05:00
debug New feature: press 4 to show QR for address shown via USB protocol (mk3) 2020-02-25 09:39:08 -05:00
devtest updates for v4 2021-03-03 14:05:01 -05:00
.gitignore Cleanup gitignores; put closed to used directory 2018-11-26 09:00:01 -05:00
api.py dev squashed 2020-11-18 14:19:14 -05: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 Speed/performance 2021-03-09 15:32:32 -05:00
constants.py multisig changes 2020-11-23 14:52:59 -05:00
helpers.py Multsig address explorer fixes and tests 2021-01-14 09:51:27 -05:00
Makefile dev squashed 2020-11-18 14:19:14 -05:00
objstruct.py dev squashed 2020-11-18 14:19:14 -05:00
psbt.py dev squashed 2020-11-18 14:19:14 -05:00
pytest.ini fixes 2021-03-01 14:38:19 -05:00
README.md Added more detail 2019-04-18 13:14:27 -04:00
requirements.txt New feature: press 4 to show QR for address shown via USB protocol (mk3) 2020-02-25 09:39:08 -05:00
sigheader.py Support firmware limiting itself to specific hardware revs 2020-01-21 09:53:56 -05:00
test_addr.py notes/fix for real dev 2021-03-05 13:58:07 -05:00
test_address_explorer.py First pass w/ libNgU 2021-03-01 09:03:03 -05:00
test_attended.py dev squashed 2020-11-18 14:19:14 -05:00
test_bip39pw.py dev squashed 2020-11-18 14:19:14 -05:00
test_change_pins.py test cases updated 2021-03-12 09:58:27 -05:00
test_drv_entro.py test cases updated 2021-03-12 09:58:27 -05:00
test_export.py dev squashed 2020-11-18 14:19:14 -05:00
test_hsm.py test cases updated 2021-03-12 09:58:27 -05:00
test_msg.py dev squashed 2020-11-18 14:19:14 -05:00
test_multisig.py updates for v4 2021-03-03 14:05:01 -05:00
test_paper.py skip paper wallet tests if feature not installed 2021-01-07 09:20:16 -05:00
test_pincodes.py test cases updated 2021-03-12 09:58:27 -05:00
test_pwsave.py sadly only on simulator 2021-03-05 14:11:19 -05:00
test_sign.py Speed/performance 2021-03-09 15:32:32 -05:00
test_unit.py support real dev for test_hmac_key() 2021-03-05 14:04:34 -05:00
test_upgrades.py test cases updated 2021-03-12 09:58:27 -05:00
test_usb.py test cases updated 2021-03-12 09:58:27 -05:00
test_ux.py fixes 2021-03-01 14:38:19 -05:00
test-wallet-backup.txt Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
txn.py dev squashed 2020-11-18 14:19:14 -05:00
xfp-miner.py dev squashed 2020-11-18 14:19:14 -05:00
xpub.py Useful helper 2020-12-10 10:35:58 -05: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