mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 00:48:19 +00:00
core: rename emulator to trezor-emu-core
This commit is contained in:
parent
8502412dbc
commit
063aba910d
10
ci/build.yml
10
ci/build.yml
@ -67,7 +67,7 @@ core unix regular build:
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
paths:
|
||||
- core/build/unix/micropython
|
||||
- core/build/unix/trezor-emu-core
|
||||
- core/src/trezor/res/resources.py
|
||||
expire_in: 1 week
|
||||
|
||||
@ -78,7 +78,7 @@ core unix frozen regular build:
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
paths:
|
||||
- core/build/unix/micropython
|
||||
- core/build/unix/trezor-emu-core
|
||||
expire_in: 1 week
|
||||
|
||||
core unix frozen btconly debug build:
|
||||
@ -88,11 +88,11 @@ core unix frozen btconly debug build:
|
||||
BITCOIN_ONLY: "1"
|
||||
script:
|
||||
- nix-shell --run "pipenv run make -C core build_unix_frozen"
|
||||
- mv core/build/unix/micropython core/build/unix/micropython-bitcoinonly
|
||||
- mv core/build/unix/trezor-emu-core core/build/unix/trezor-emu-core-bitcoinonly
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
paths:
|
||||
- core/build/unix/micropython-bitcoinonly
|
||||
- core/build/unix/trezor-emu-core-bitcoinonly
|
||||
expire_in: 1 week
|
||||
|
||||
core unix frozen debug build:
|
||||
@ -114,7 +114,7 @@ core unix frozen regular darwin:
|
||||
script:
|
||||
- nix-shell --run "pipenv run make -C core build_unix_frozen"
|
||||
- mkdir -p TrezorEmu-$CI_COMMIT_SHORT_SHA.app/Contents/{MacOS,libs}
|
||||
- cp -v core/build/unix/micropython TrezorEmu-$CI_COMMIT_SHORT_SHA.app/Contents/MacOS/TrezorEmu-$CI_COMMIT_SHORT_SHA
|
||||
- cp -v core/build/unix/trezor-emu-core TrezorEmu-$CI_COMMIT_SHORT_SHA.app/Contents/MacOS/TrezorEmu-$CI_COMMIT_SHORT_SHA
|
||||
- dylibbundler -of -b -i /usr/lib/system -d TrezorEmu-$CI_COMMIT_SHORT_SHA.app/Contents/libs -x TrezorEmu-$CI_COMMIT_SHORT_SHA.app/Contents/MacOS/TrezorEmu-$CI_COMMIT_SHORT_SHA
|
||||
- mv TrezorEmu-$CI_COMMIT_SHORT_SHA.app trezor-emu-regular-macos-$CORE_VERSION-$CI_COMMIT_SHORT_SHA.app
|
||||
allow_failure: true
|
||||
|
@ -227,7 +227,7 @@ upgrade tests core deploy:
|
||||
- "[[ $TAG == '' ]] && echo 'Tag is not core/*: exiting.' && exit 1"
|
||||
- DEST=${DEPLOY_PATH}/trezor-emu-$TAG
|
||||
- echo "Deploying to $DEST"
|
||||
- rsync --delete -va core/build/unix/micropython "$DEST"
|
||||
- rsync --delete -va core/build/unix/trezor-emu-core "$DEST"
|
||||
only:
|
||||
- /^core\//
|
||||
except:
|
||||
|
@ -56,7 +56,7 @@ core btconly device test:
|
||||
dependencies:
|
||||
- core unix frozen btconly debug build
|
||||
variables:
|
||||
MICROPYTHON: "build/unix/micropython-bitcoinonly"
|
||||
MICROPYTHON: "build/unix/trezor-emu-core-bitcoinonly"
|
||||
TREZOR_PYTEST_SKIP_ALTCOINS: 1
|
||||
script:
|
||||
- nix-shell --run "pipenv run make -C core test_emu"
|
||||
@ -112,9 +112,9 @@ core fido2 test:
|
||||
variables:
|
||||
TREZOR_PROFILING: 1
|
||||
script:
|
||||
- pgrep micropython || true
|
||||
- pgrep trezor-emu-core || true
|
||||
- nix-shell --run "pipenv run make -C core test_emu_fido2"
|
||||
- pgrep micropython || true
|
||||
- pgrep trezor-emu-core || true
|
||||
- mv core/src/.coverage core/.coverage.test_emu_fido2
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_SHORT_SHA"
|
||||
|
@ -67,7 +67,7 @@ res: templates ## update resources
|
||||
## emulator commands:
|
||||
|
||||
run: ## run unix port
|
||||
cd src ; ../$(UNIX_BUILD_DIR)/micropython
|
||||
cd src ; ../$(UNIX_BUILD_DIR)/trezor-emu-core
|
||||
|
||||
emu: ## run emulator
|
||||
$(EMU)
|
||||
@ -139,13 +139,13 @@ build_firmware: res build_cross ## build firmware with frozen modules
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" PRODUCTION="$(PRODUCTION)" PYOPT="$(PYOPT)" BITCOIN_ONLY="$(BITCOIN_ONLY)" RDI="$(RDI)" $(FIRMWARE_BUILD_DIR)/firmware.bin
|
||||
|
||||
build_unix: res ## build unix port
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/micropython $(UNIX_PORT_OPTS) BITCOIN_ONLY="$(BITCOIN_ONLY)"
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/trezor-emu-core $(UNIX_PORT_OPTS) BITCOIN_ONLY="$(BITCOIN_ONLY)"
|
||||
|
||||
build_unix_frozen: res build_cross ## build unix port with frozen modules
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/micropython $(UNIX_PORT_OPTS) PYOPT="$(PYOPT)" BITCOIN_ONLY="$(BITCOIN_ONLY)" TREZOR_EMULATOR_FROZEN=1
|
||||
$(SCONS) CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/trezor-emu-core $(UNIX_PORT_OPTS) PYOPT="$(PYOPT)" BITCOIN_ONLY="$(BITCOIN_ONLY)" TREZOR_EMULATOR_FROZEN=1
|
||||
|
||||
build_unix_debug: res ## build unix port
|
||||
$(SCONS) --max-drift=1 CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/micropython $(UNIX_PORT_OPTS) TREZOR_EMULATOR_ASAN=1 TREZOR_EMULATOR_DEBUGGABLE=1
|
||||
$(SCONS) --max-drift=1 CFLAGS="$(CFLAGS)" $(UNIX_BUILD_DIR)/trezor-emu-core $(UNIX_PORT_OPTS) TREZOR_EMULATOR_ASAN=1 TREZOR_EMULATOR_DEBUGGABLE=1
|
||||
|
||||
build_cross: ## build mpy-cross port
|
||||
$(MAKE) -C vendor/micropython/mpy-cross $(CROSS_PORT_OPTS)
|
||||
|
@ -565,6 +565,6 @@ if EVERYTHING:
|
||||
env.Depends(obj_program, secp256k1_zkp_ecmult_static_context)
|
||||
|
||||
program = env.Command(
|
||||
target='micropython',
|
||||
target='trezor-emu-core',
|
||||
source=obj_program,
|
||||
action='$CC -o $TARGET $SOURCES $_LIBDIRFLAGS $_LIBFLAGS $LINKFLAGS', )
|
||||
|
@ -22,7 +22,7 @@ except Exception:
|
||||
|
||||
|
||||
HERE = Path(__file__).parent.resolve()
|
||||
MICROPYTHON = HERE / "build" / "unix" / "micropython"
|
||||
MICROPYTHON = HERE / "build" / "unix" / "trezor-emu-core"
|
||||
SRC_DIR = HERE / "src"
|
||||
|
||||
PROFILING_WRAPPER = HERE / "prof" / "prof.py"
|
||||
|
@ -13,4 +13,4 @@ else
|
||||
cd "src${TREZOR_MODEL}"
|
||||
fi
|
||||
|
||||
../build/unix/micropython -O$PYOPT -X heapsize=20M
|
||||
../build/unix/trezor-emu-core -O$PYOPT -X heapsize=20M
|
||||
|
@ -3,7 +3,7 @@
|
||||
declare -a results
|
||||
declare -i passed=0 failed=0 exit_code=0
|
||||
declare COLOR_GREEN='\e[32m' COLOR_RED='\e[91m' COLOR_RESET='\e[39m'
|
||||
MICROPYTHON="${MICROPYTHON:-../build/unix/micropython -X heapsize=1M}"
|
||||
MICROPYTHON="${MICROPYTHON:-../build/unix/trezor-emu-core -X heapsize=1M}"
|
||||
|
||||
print_summary() {
|
||||
echo
|
||||
|
@ -3,7 +3,7 @@
|
||||
: "${RUN_TEST_EMU:=1}"
|
||||
|
||||
CORE_DIR="$(SHELL_SESSION_FILE='' && cd "$( dirname "${BASH_SOURCE[0]}" )/.." >/dev/null 2>&1 && pwd )"
|
||||
MICROPYTHON="${MICROPYTHON:-$CORE_DIR/build/unix/micropython}"
|
||||
MICROPYTHON="${MICROPYTHON:-$CORE_DIR/build/unix/trezor-emu-core}"
|
||||
TREZOR_SRC="${CORE_DIR}/src"
|
||||
|
||||
DISABLE_ANIMATION=1
|
||||
|
@ -24,7 +24,7 @@ ROOT = Path(__file__).parent.parent.resolve()
|
||||
BINDIR = ROOT / "tests" / "emulators"
|
||||
|
||||
LOCAL_BUILD_PATHS = {
|
||||
"core": ROOT / "core" / "build" / "unix" / "micropython",
|
||||
"core": ROOT / "core" / "build" / "unix" / "trezor-emu-core",
|
||||
"legacy": ROOT / "legacy" / "firmware" / "trezor.elf",
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user