summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2022-03-11 09:53:17 +0100
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2022-03-11 09:53:17 +0100
commita32831c840aa5ebf8b78caf38db5ba45f8be96c3 (patch)
tree16bb2c2ff6a5b10d9d21de482a0728ed06bcc2e0
parent6f68b21fc6e2f675ea83c4b96df93fcf7edc54dd (diff)
use one command for tests / coverage / etc.
-rwxr-xr-xcheck33
-rwxr-xr-xrun_coverage4
-rwxr-xr-xrun_qa3
-rwxr-xr-xrun_tests4
-rwxr-xr-xrun_typecheck3
5 files changed, 33 insertions, 14 deletions
diff --git a/check b/check
new file mode 100755
index 0000000..8f55de5
--- /dev/null
+++ b/check
@@ -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
diff --git a/run_coverage b/run_coverage
deleted file mode 100755
index 77765e0..0000000
--- a/run_coverage
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-nosetests3 --with-coverage --cover-erase --cover-package=hazwaz
-#nose2-3 --with-coverage --coverage-report=term --log-level=ERROR -B --log-capture
diff --git a/run_qa b/run_qa
deleted file mode 100755
index f9f643f..0000000
--- a/run_qa
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-flake8 --select=E,F,W,C90,E123 --ignore=W503 .
diff --git a/run_tests b/run_tests
deleted file mode 100755
index b4f44f1..0000000
--- a/run_tests
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-nosetests3
-#nose2-3 --log-level=ERROR -B --log-capture
diff --git a/run_typecheck b/run_typecheck
deleted file mode 100755
index 1dd6bc9..0000000
--- a/run_typecheck
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-mypy hazwaz