Switch to Trezor monorepo
This commit is contained in:
parent
6952edd879
commit
ef816628e1
@ -19,7 +19,7 @@ from test_udevrules import TestUdevRulesInstaller
|
||||
parser = argparse.ArgumentParser(description='Setup the testing environment and run automated tests')
|
||||
trezor_group = parser.add_mutually_exclusive_group()
|
||||
trezor_group.add_argument('--no_trezor', help='Do not run Trezor test with emulator', action='store_true')
|
||||
trezor_group.add_argument('--trezor', help='Path to Trezor emulator.', default='work/trezor-mcu/firmware/trezor.elf')
|
||||
trezor_group.add_argument('--trezor', help='Path to Trezor emulator.', default='work/trezor-firmware/legacy/firmware/trezor.elf')
|
||||
coldcard_group = parser.add_mutually_exclusive_group()
|
||||
coldcard_group.add_argument('--no_coldcard', help='Do not run Coldcard test with simulator', action='store_true')
|
||||
coldcard_group.add_argument('--coldcard', help='Path to Coldcard simulator.', default='work/firmware/unix/headless.py')
|
||||
|
||||
@ -9,12 +9,12 @@ cd work
|
||||
|
||||
# Clone trezor-mcu if it doesn't exist, or update it if it does
|
||||
trezor_setup_needed=false
|
||||
if [ ! -d "trezor-mcu" ]; then
|
||||
git clone --recursive https://github.com/trezor/trezor-mcu.git
|
||||
cd trezor-mcu
|
||||
if [ ! -d "trezor-firmware" ]; then
|
||||
git clone --recursive https://github.com/trezor/trezor-firmware.git
|
||||
cd trezor-firmware
|
||||
trezor_setup_needed=true
|
||||
else
|
||||
cd trezor-mcu
|
||||
cd trezor-firmware
|
||||
git fetch
|
||||
|
||||
# Determine if we need to pull. From https://stackoverflow.com/a/3278427
|
||||
@ -31,8 +31,9 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# Build emulator. This is pretty fast, so rebuilding every time is ok
|
||||
# Build trezor one emulator. This is pretty fast, so rebuilding every time is ok
|
||||
# But there should be some caching that makes this faster
|
||||
cd legacy
|
||||
export EMULATOR=1 TREZOR_TRANSPORT_V1=1 DEBUG_LINK=1 HEADLESS=1
|
||||
if [ "$trezor_setup_needed" == true ] ; then
|
||||
script/setup
|
||||
@ -41,7 +42,7 @@ fi
|
||||
pipenv run script/cibuild
|
||||
# Delete any emulator.img file
|
||||
find . -name "emulator.img" -exec rm {} \;
|
||||
cd ..
|
||||
cd ../..
|
||||
|
||||
# Clone coldcard firmware if it doesn't exist, or update it if it does
|
||||
coldcard_setup_needed=false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user