Fixed run_tests
This commit is contained in:
parent
2175a6baf5
commit
592f605cad
1 changed files with 5 additions and 2 deletions
|
@ -2,9 +2,8 @@
|
|||
|
||||
BASE_DIR="$(mktemp -d '/tmp/platypush-ci-tests-XXXXX')"
|
||||
VENV_DIR="$BASE_DIR/venv"
|
||||
REPO_DIR="$BASE_DIR/repo"
|
||||
REPO_DIR="/opt/repos/platypush"
|
||||
TEST_LOG="$BASE_DIR/test.log"
|
||||
REPO_URL=https://git.platypush.tech/platypush/platypush.git
|
||||
|
||||
cleanup() {
|
||||
echo "Cleaning up environment"
|
||||
|
@ -21,11 +20,14 @@ prepare_venv() {
|
|||
|
||||
install_repo() {
|
||||
echo "Installing latest version of the repository"
|
||||
cd "$REPO_DIR"
|
||||
pip install '.[http]'
|
||||
cd -
|
||||
}
|
||||
|
||||
run_tests() {
|
||||
echo "Running tests"
|
||||
cd "$REPO_DIR"
|
||||
pytest 2>&1 | tee "$TEST_LOG"
|
||||
deactivate
|
||||
|
||||
|
@ -34,6 +36,7 @@ run_tests() {
|
|||
return 2 # FAILURE
|
||||
fi
|
||||
|
||||
cd -
|
||||
return 0 # PASSED
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue