script: Add Scripts To Rule Them All

pull/25/head
Saleem Rashid 7 years ago committed by Pavol Rusnak
parent 17340c2396
commit 923d5f7555

3
.gitmodules vendored

@ -13,3 +13,6 @@
[submodule "vendor/nanopb"]
path = vendor/nanopb
url = https://github.com/nanopb/nanopb.git
[submodule "python-trezor"]
path = vendor/python-trezor
url = https://github.com/trezor/python-trezor.git

@ -26,13 +26,8 @@ install:
- pip2 install --user "protobuf==${PROTOBUF_VERSION}"
script:
- make -C vendor/libopencm3 lib/stm32/f2
- make -C vendor/nanopb/generator/proto
- make
- script/cibuild
- make -C bootloader
- make -C fastflash
- make -C firmware/protob
- make -C firmware
- make -C demo
notifications:

@ -0,0 +1,10 @@
#!/bin/bash
# script/bootstrap: Resolve all dependencies that the application requires to
# run.
set -e
cd "$(dirname "$0")/.."
git submodule update --init

@ -0,0 +1,25 @@
#!/bin/bash
# script/cibuild: Setup environment for CI to run tests. This is primarily
# designed to run on the continuous integration server.
set -e
cd "$(dirname "$0")/.."
if [ "$EMULATOR" = 1 ]; then
make -C emulator
else
make -C vendor/libopencm3 lib/stm32/f2
fi
make
if [ "$FASTFLASH" = 1 ]; then
make -C fastflash
fi
make -C vendor/nanopb/generator/proto
make -C firmware/protob
make -C firmware

@ -0,0 +1,13 @@
#!/bin/bash
# script/setup: Set up application for the first time after cloning, or set it
# back to the initial first unused state.
set -e
cd "$(dirname "$0")/.."
script/bootstrap
git clean -fdX
git submodule foreach git clean -fdX

@ -0,0 +1,20 @@
#!/bin/bash
# script/test: Run test suite for application.
set -e
cd "$(dirname "$0")/.."
# Kill jobs on exit
trap "exit" INT TERM
trap "kill 0" EXIT
if [ "$EMULATOR" = 1 ]; then
firmware/trezor.elf &
fi
TREZOR_TRANSPORT_V1=1 pytest "vendor/python-trezor/tests/device_tests" &
# Wait for either job to exit and kill the other
wait -n

@ -0,0 +1 @@
Subproject commit 90c49e3386ee9391c2a57e2ca0a40f8a909a47cc
Loading…
Cancel
Save