firmware/testing
2020-02-10 10:06:49 -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 Feature complete on HSM 2020-01-20 11:10:15 -05:00
.gitignore Cleanup gitignores; put closed to used directory 2018-11-26 09:00:01 -05:00
api.py Add testcase against bitcoind as discussed on PR#32 2019-11-25 10:26:20 -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 Add new 'visualize' transaction feature 2020-02-06 10:21:09 -05:00
constants.py More HSM test cases 2020-01-17 14:52:32 -05:00
helpers.py Changes for 3.0.6 2019-12-19 10:57:59 -05:00
Makefile Add CLI test case for multisig 2019-05-21 10:07:51 -04:00
objstruct.py Starting HSM test code 2020-01-15 16:32:59 -05:00
psbt.py Cleanup imports 2019-06-17 09:20:28 -04:00
pytest.ini Add never_log, improve local PINs 2020-01-23 10:01:38 -05:00
README.md Added more detail 2019-04-18 13:14:27 -04:00
requirements.txt More HSM test cases 2020-01-17 14:52:32 -05:00
sigheader.py Support firmware limiting itself to specific hardware revs 2020-01-21 09:53:56 -05:00
test_addr.py Add CLI test case for multisig 2019-05-21 10:07:51 -04:00
test_address_explorer.py Updates to match new UX 2020-01-17 10:29:31 -05:00
test_attended.py Making whole firmware public with single, signed commit. 2018-07-24 14:07:33 -04:00
test_bip39pw.py Starting HSM test code 2020-01-15 16:32:59 -05: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 testcase against bitcoind as discussed on PR#32 2019-11-25 10:26:20 -05:00
test_hsm.py Increase max for allow_sl 2020-02-10 10:06:49 -05:00
test_msg.py Add new 'visualize' transaction feature 2020-02-06 10:21:09 -05:00
test_multisig.py Starting HSM test code 2020-01-15 16:32:59 -05:00
test_paper.py Add test case for dice-rolling method 2019-11-21 11:33:45 -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 Add new 'visualize' transaction feature 2020-02-06 10:21:09 -05:00
test_unit.py Support for wildcard in deriv path whitelists 2020-01-28 11:12:08 -05:00
test_upgrades.py Missed file 2020-01-21 09:57:18 -05:00
test_usb.py Support firmware limiting itself to specific hardware revs 2020-01-21 09:53:56 -05: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
txn.py Easier to use 2020-01-16 13:39:50 -05: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