diff options
| author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-03-11 09:53:17 +0100 | 
|---|---|---|
| committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-03-11 09:53:17 +0100 | 
| commit | a32831c840aa5ebf8b78caf38db5ba45f8be96c3 (patch) | |
| tree | 16bb2c2ff6a5b10d9d21de482a0728ed06bcc2e0 /check | |
| parent | 6f68b21fc6e2f675ea83c4b96df93fcf7edc54dd (diff) | |
use one command for tests / coverage / etc.
Diffstat (limited to 'check')
| -rwxr-xr-x | check | 33 | 
1 files changed, 33 insertions, 0 deletions
| @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +if [ $# -lt 1 ] +then +    ./check coverage && \ +    ./check typecheck && \ +    ./check qa +    exit $? +fi + +SUBCMD=$1 +shift 1 + +case $SUBCMD in +    "tests") +        nose2-3 $COVER_OPT --log-level=ERROR -B --log-capture $* +        ;; +    "coverage") +        nose2-3 --with-coverage --coverage-report=term \ +            --log-level=ERROR -B --log-capture $* +        ;; +    "qa") +        flake8 --select=E,F,W,C90,E123 --ignore=W503 . +        ;; +    "typecheck") +        mypy hazwaz +        ;; +    *) +        echo "No such subcommand $SUBCMD" +        ;; +esac | 
