mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
core/tests: disable fading, improve runners
This commit is contained in:
parent
36534325f0
commit
0b03794fee
@ -1,21 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
MICROPYTHON=../build/unix/micropython
|
||||
SDIR="$(SHELL_SESSION_FILE='' && cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
CORE_DIR="$SDIR/.."
|
||||
MICROPYTHON="$CORE_DIR/build/unix/micropython"
|
||||
RUN_TEST_EMU=1
|
||||
DISABLE_FADE=1
|
||||
PYOPT=0
|
||||
|
||||
# run emulator
|
||||
cd ../src
|
||||
$MICROPYTHON -O$PYOPT main.py >/dev/null &
|
||||
upy_pid=$!
|
||||
sleep 1
|
||||
# run emulator if RUN_TEST_EMU
|
||||
if [[ $RUN_TEST_EMU > 0 ]]; then
|
||||
cd "$CORE_DIR/src"
|
||||
TREZOR_TEST=1 \
|
||||
TREZOR_DISABLE_FADE=$DISABLE_FADE \
|
||||
$MICROPYTHON -O$PYOPT main.py >/dev/null &
|
||||
upy_pid=$!
|
||||
sleep 1
|
||||
cd -
|
||||
fi
|
||||
|
||||
export TREZOR_PATH=udp:127.0.0.1:21324
|
||||
|
||||
# run tests
|
||||
cd ..
|
||||
error=0
|
||||
if ! pytest "$@"; then
|
||||
error=1
|
||||
error=1
|
||||
fi
|
||||
kill $upy_pid
|
||||
exit $error
|
||||
|
@ -7,13 +7,16 @@
|
||||
SDIR="$(SHELL_SESSION_FILE='' && cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
CORE_DIR="$SDIR/.."
|
||||
MICROPYTHON="$CORE_DIR/build/unix/micropython"
|
||||
DISABLE_FADE=1
|
||||
PYOPT=0
|
||||
upy_pid=""
|
||||
|
||||
# run emulator if RUN_TEST_EMU
|
||||
if [[ $RUN_TEST_EMU > 0 ]]; then
|
||||
cd "$CORE_DIR/src"
|
||||
"$MICROPYTHON" -O$PYOPT main.py >/dev/null &
|
||||
TREZOR_TEST=1 \
|
||||
TREZOR_DISABLE_FADE=$DISABLE_FADE \
|
||||
"$MICROPYTHON" -O$PYOPT main.py >/dev/null &
|
||||
upy_pid=$!
|
||||
cd -
|
||||
sleep 1
|
||||
|
Loading…
Reference in New Issue
Block a user