diff --git a/core/tests/run_tests.sh b/core/tests/run_tests.sh index d89072e86..29d668333 100755 --- a/core/tests/run_tests.sh +++ b/core/tests/run_tests.sh @@ -3,7 +3,7 @@ declare -a results declare -i PYOPT=1 passed=0 failed=0 exit_code=0 declare COLOR_GREEN='\e[32m' COLOR_RED='\e[91m' COLOR_RESET='\e[39m' -declare MICROPYTHON=../build/unix/micropython +MICROPYTHON="${MICROPYTHON:-../build/unix/micropython}" print_summary() { echo diff --git a/core/tests/run_tests_device_emu.sh b/core/tests/run_tests_device_emu.sh index f290a3484..4ce02e27e 100755 --- a/core/tests/run_tests_device_emu.sh +++ b/core/tests/run_tests_device_emu.sh @@ -2,7 +2,7 @@ SDIR="$(SHELL_SESSION_FILE='' && cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" CORE_DIR="$SDIR/.." -MICROPYTHON="$CORE_DIR/build/unix/micropython" +MICROPYTHON="${MICROPYTHON:-$CORE_DIR/build/unix/micropython}" RUN_TEST_EMU=1 DISABLE_FADE=1 PYOPT=0 diff --git a/core/tests/run_tests_device_emu_monero.sh b/core/tests/run_tests_device_emu_monero.sh index 90659a152..3ba358308 100755 --- a/core/tests/run_tests_device_emu_monero.sh +++ b/core/tests/run_tests_device_emu_monero.sh @@ -6,7 +6,7 @@ SDIR="$(SHELL_SESSION_FILE='' && cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" CORE_DIR="$SDIR/.." -MICROPYTHON="$CORE_DIR/build/unix/micropython" +MICROPYTHON="${MICROPYTHON:-$CORE_DIR/build/unix/micropython}" DISABLE_FADE=1 PYOPT=0 upy_pid="" diff --git a/legacy/script/test b/legacy/script/test index 5481d3d9f..e4f1758d9 100755 --- a/legacy/script/test +++ b/legacy/script/test @@ -2,6 +2,8 @@ # script/test: Run test suite for application. +EMULATOR_BINARY="${EMULATOR_BINARY:-firmware/trezor.elf}" + set -e cd "$(dirname "$0")/.." @@ -9,7 +11,7 @@ cd "$(dirname "$0")/.." if [ "$EMULATOR" = 1 ]; then trap "kill %1" EXIT - firmware/trezor.elf & + "${EMULATOR_BINARY}" & export TREZOR_PATH=udp:127.0.0.1:21324 "${PYTHON:-python}" script/wait_for_emulator.py fi