mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
feat(ci): running connect tests against current branch
This commit is contained in:
parent
38d44e6803
commit
3ed92a72bb
@ -57,6 +57,7 @@ stdenvNoCC.mkDerivation ({
|
||||
autoflake
|
||||
bash
|
||||
check
|
||||
curl # for connect tests
|
||||
editorconfig-checker
|
||||
gcc
|
||||
gcc-arm-embedded
|
||||
|
24
ci/test.yml
24
ci/test.yml
@ -373,3 +373,27 @@ core unix memory profiler:
|
||||
- core/prof/memperf-html
|
||||
expire_in: 1 week
|
||||
when: always
|
||||
|
||||
# Connect
|
||||
|
||||
connect test core:
|
||||
image: registry.gitlab.com/satoshilabs/trezor/trezor-user-env/trezor-user-env:latest
|
||||
stage: test
|
||||
needs:
|
||||
- core unix frozen debug build
|
||||
variables:
|
||||
SDL_VIDEODRIVER: "dummy"
|
||||
before_script:
|
||||
- cp /builds/satoshilabs/trezor/trezor-firmware/core/build/unix/trezor-emu-core /trezor-user-env/src/binaries/firmware/bin/trezor-emu-core-v2.99.99
|
||||
- chmod u+x /trezor-user-env/src/binaries/firmware/bin/trezor-emu-core-v2.99.99
|
||||
- nix-shell -p autoPatchelfHook SDL2 SDL2_image --run "autoPatchelf /trezor-user-env/src/binaries/firmware/bin/trezor-emu-core-v2.99.99"
|
||||
script:
|
||||
- /trezor-user-env/run.sh &
|
||||
- nix-shell --run "tests/connect_tests/connect_tests.sh 2.99.99"
|
||||
after_script:
|
||||
- cp /trezor-user-env/logs/debugging.log trezor-user-env-debugging.log
|
||||
artifacts:
|
||||
paths:
|
||||
- trezor-user-env-debugging.log
|
||||
expire_in: 1 week
|
||||
when: always
|
||||
|
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
junit.xml
|
||||
trezor.log
|
||||
connect_tests/connect
|
||||
|
30
tests/connect_tests/connect_tests.sh
Executable file
30
tests/connect_tests/connect_tests.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Cloning connect repository and running the tests from there
|
||||
|
||||
FILE_DIR="$(dirname "${0}")"
|
||||
cd ${FILE_DIR}
|
||||
|
||||
CONNECT_DIR="connect"
|
||||
|
||||
# For quicker local usage, do not cloning connect repo if it already exists
|
||||
if [[ ! -d "${CONNECT_DIR}" ]]
|
||||
then
|
||||
git clone https://github.com/trezor/connect.git
|
||||
cd ${CONNECT_DIR}
|
||||
git submodule update --init --recursive
|
||||
else
|
||||
cd ${CONNECT_DIR}
|
||||
fi
|
||||
|
||||
# Taking an optional script argument with emulator version
|
||||
if [ ! -z "${1}" ]
|
||||
then
|
||||
EMU_VERSION="${1}"
|
||||
else
|
||||
EMU_VERSION="2-master"
|
||||
fi
|
||||
echo "Will be running with ${EMU_VERSION} emulator"
|
||||
|
||||
# Using -d flag to disable docker, as tenv is already running on the background
|
||||
nix-shell --run "yarn && tests/run.sh -d -f ${EMU_VERSION}"
|
Loading…
Reference in New Issue
Block a user