From 3a35a5a5be0b5c59cd7a910ceadec434c9c7e04f Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Fri, 28 Jul 2017 19:44:06 +0200 Subject: [PATCH] tests: rework device tests to checkout just device_tests subdirectory from python-trezor repo --- Makefile | 2 +- tests/.gitignore | 2 +- tests/{run_tests_python_trezor.sh => run_tests_device.sh} | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) rename tests/{run_tests_python_trezor.sh => run_tests_device.sh} (86%) diff --git a/Makefile b/Makefile index ca0b50d11..e6f76f552 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ test: ## run unit tests cd tests ; ./run_tests.sh testpy: ## run selected unit tests from python-trezor - cd tests ; ./run_tests_python_trezor.sh + cd tests ; ./run_tests_device.sh pylint: ## run pylint on application sources pylint -E $(shell find src -name *.py) diff --git a/tests/.gitignore b/tests/.gitignore index fb6820c6d..a0512533e 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1 +1 @@ -python-trezor/ +device_tests/ diff --git a/tests/run_tests_python_trezor.sh b/tests/run_tests_device.sh similarity index 86% rename from tests/run_tests_python_trezor.sh rename to tests/run_tests_device.sh index c2c6309ed..10a8026bd 100755 --- a/tests/run_tests_python_trezor.sh +++ b/tests/run_tests_device.sh @@ -1,9 +1,7 @@ #!/bin/bash -if [ -d python-trezor ]; then - cd python-trezor ; git pull ; cd .. -else - git clone https://github.com/trezor/python-trezor.git +if [ \! -d device_tests ]; then + curl -s -L https://github.com/trezor/python-trezor/archive/master.tar.gz | tar -xvz --strip-components=2 python-trezor-master/tests/device_tests fi # run emulator @@ -14,7 +12,7 @@ UPY_PID=$! sleep 1 -cd ../tests/python-trezor/tests/device_tests +cd ../tests/device_tests error=0