firmware/testing
Peter D. Gray b9ab41b95a Cleanup
2019-06-03 11:16:09 -04:00
..
data Add test case from SomberNight 2018-11-08 10:50:47 -05:00
debug Cleanup gitignores; put closed to used directory 2018-11-26 09:00:11 -05:00
devtest Handle duplicated XFP values better 2019-05-17 13:19:37 -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 Use bitcoin-core to be a partner in 2-of-2 w/ Coldcard 2019-05-31 14:44:56 -04:00
constants.py Refactoring 2019-05-14 14:18:37 -04:00
helpers.py Use bitcoin-core to be a partner in 2-of-2 w/ Coldcard 2019-05-31 14:44:56 -04:00
Makefile Add CLI test case for multisig 2019-05-21 10:07:51 -04:00
psbt.py Cleanup 2019-06-03 11:16:09 -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_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_devtest.py Working towards multisig 2019-04-30 15:20:38 -04:00
test_export.py Add test cases for wallet export options 2019-05-14 09:28:27 -04:00
test_msg.py Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
test_multisig.py Cleanup 2019-06-03 11:16:09 -04:00
test_pincodes.py passing bad_logins 2018-12-12 11:26:27 -05:00
test_sign.py More progress toward multisig 2019-05-23 12:56:43 -04:00
test_usb.py bugfix 2018-07-25 09:31:49 -04:00
test_ux.py Refactoring 2019-05-14 14:18:37 -04: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