From 0fa57d14f970e67daa1afcadd35394bf167be18e Mon Sep 17 00:00:00 2001 From: Andrei Andreev Date: Wed, 9 Mar 2022 11:19:02 +0100 Subject: [PATCH] Update Tribler's run scripts --- src/README.md | 14 ++++---------- src/run_tests.bat | 2 -- src/run_tests.sh | 8 -------- src/run_tribler.bat | 2 +- src/tribler.sh | 2 +- 5 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 src/run_tests.bat delete mode 100755 src/run_tests.sh diff --git a/src/README.md b/src/README.md index 1ed3d5ee415..d224f125dd0 100644 --- a/src/README.md +++ b/src/README.md @@ -25,17 +25,11 @@ from` requirements.txt`. ## -Export to PYTHONPATH the following directories: +Export to the `PYTHONPATH` the `src` directory: -* tribler-core -* tribler-gui - -Shortcut for macOS: -```shell script -export PYTHONPATH=${PYTHONPATH}:`echo {pyipv8,tribler-core,tribler-gui} | tr " " :` -``` Execute: ``` -python3 -m pytest tribler-core -python3 -m pytest tribler-gui --guitests +python3 -m pytest . +python3 -m pytest . --no_parallel +python3 -m pytest . --guitests ``` \ No newline at end of file diff --git a/src/run_tests.bat b/src/run_tests.bat deleted file mode 100644 index b754d844391..00000000000 --- a/src/run_tests.bat +++ /dev/null @@ -1,2 +0,0 @@ -set PYTHONPATH=%~dp0tribler-core -pytest %~dp0tribler-core %* diff --git a/src/run_tests.sh b/src/run_tests.sh deleted file mode 100755 index 9ee008258ff..00000000000 --- a/src/run_tests.sh +++ /dev/null @@ -1,8 +0,0 @@ -script_path() { - DIR="${1%/*}" - (cd "$DIR" && echo "$(pwd -P)") -} - -SRC_DIR="$(dirname "$(script_path "$0")")/src" -export PYTHONPATH=$SRC_DIR/tribler-core -pytest $SRC_DIR/tribler-core "$@" diff --git a/src/run_tribler.bat b/src/run_tribler.bat index 21a8d148ae2..cee8b1f8c31 100644 --- a/src/run_tribler.bat +++ b/src/run_tribler.bat @@ -1,2 +1,2 @@ -set PYTHONPATH=%~dp0tribler-core;%~dp0tribler-gui;%~dp0pyipv8;%~dp0anydex +set PYTHONPATH=%~dp0tribler python run_tribler.py diff --git a/src/tribler.sh b/src/tribler.sh index 060ca80c1cb..20730c44f13 100755 --- a/src/tribler.sh +++ b/src/tribler.sh @@ -10,7 +10,7 @@ UNAME="$(uname -s)" # Add all required modules to PYTHONPATH SRC_DIR="$(dirname "$(script_path "$0")")/src" -PYTHONPATH="$PYTHONPATH:"$SRC_DIR/pyipv8":"$SRC_DIR/anydex":"$SRC_DIR/tribler-core":"$SRC_DIR/tribler-gui"" +PYTHONPATH="$PYTHONPATH:$SRC_DIR" export PYTHONPATH TRIBLER_SCRIPT=$SRC_DIR/run_tribler.py