From fbeebd7ef2f0091a960618998e41be1ea09032ea Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Mon, 19 Feb 2024 00:28:05 +0200 Subject: Improved dev.sh. Gives 0 exit code on succesfull tests. --- dev.sh | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/dev.sh b/dev.sh index 0c2cb08..5938c3c 100755 --- a/dev.sh +++ b/dev.sh @@ -12,21 +12,32 @@ covhtml Tee haarakattavuus raportti html muodossa covxml Sama mutta xml muoto (codecov tarvitsee tämän) covff Tee html haarakattavuusraportti ja avaa se firefoxissa all Sama kuin '$0 covff && $0 pylint' -" +" && exit 0 -[ $1 = pytest ] && poetry run pytest -v +[ $1 = pytest ] \ + && poetry run pytest -v \ + && exit 0 -[ $1 = pylint ] && poetry run python3 -m pylint src/miinaharava/ +[ $1 = pylint ] \ + && poetry run python3 -m pylint src/miinaharava/ \ + && exit 0 -[ $1 = covhtml ] && poetry run python3 -m coverage run --branch -m pytest -v \ - && poetry run python3 -m coverage html +[ $1 = covhtml ] \ + && poetry run python3 -m coverage run --branch -m pytest -v \ + && poetry run python3 -m coverage html \ + && exit 0 -[ $1 = covhtml ] && poetry run python3 -m coverage run --branch -m pytest -v \ - && poetry run python3 -m coverage xml +[ $1 = covxml ] \ + && poetry run python3 -m coverage run --branch -m pytest -v \ + && poetry run python3 -m coverage xml \ + && exit 0 -[ $1 = covff ] && poetry run python3 -m coverage run --branch -m pytest -v \ - && poetry run python3 -m coverage html && firefox htmlcov/index.html +[ $1 = covff ] \ + && poetry run python3 -m coverage run --branch -m pytest -v \ + && poetry run python3 -m coverage html \ + && firefox htmlcov/index.html \ [ $1 = all ] && poetry run python3 -m coverage run --branch -m pytest -v \ - && poetry run python3 -m coverage html && firefox htmlcov/index.html \ + && poetry run python3 -m coverage html \ + && firefox htmlcov/index.html \ && poetry run python3 -m pylint src/miinaharava/ -- cgit v1.2.3