diff options
author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-19 00:28:05 +0200 |
---|---|---|
committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-02-19 00:28:05 +0200 |
commit | fbeebd7ef2f0091a960618998e41be1ea09032ea (patch) | |
tree | 1effb5a803363e0b501f99028a9b9c5feb8e83a8 | |
parent | 4aa8ad01b9618302d780899bdd767bb1dbe75939 (diff) |
Improved dev.sh. Gives 0 exit code on succesfull tests.
-rwxr-xr-x | dev.sh | 31 |
1 files changed, 21 insertions, 10 deletions
@@ -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/ |