From c6b36078f7fc4f1f76b31745e1bc3e6b35450c12 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 14 Nov 2020 16:27:21 +0200 Subject: test: make ./check clearer by making it less generic --- check | 39 +++++++++------------------------------ 1 file changed, 9 insertions(+), 30 deletions(-) diff --git a/check b/check index 753de3d..f9d68e1 100755 --- a/check +++ b/check @@ -24,40 +24,19 @@ then hideok= fi - -codegen() { - $hideok sp-codegen "$1" --output "$2" --run -} - -docgen() { - $hideok sp-docgen "$1" --output "$2" -} - +$hideok cargo check --all-targets +$hideok cargo clippy $hideok cargo build --all-targets -if cargo --list | awk '{ print $1 }' | grep 'clippy$' > /dev/null -then - $hideok cargo clippy -fi $hideok cargo test -if command -v rustfmt > /dev/null -then - find src -type f -name '*.rs' -exec rustfmt --check '{}' + -fi +$hideok cargo fmt -- --check +$hideok find . -type f -name '*.py' ! -name test.py -exec black --check '{}' + -if command -v black > /dev/null -then - $hideok find . -type f -name '*.py' ! -name template.py ! -name test.py \ - -exec black --check '{}' + -fi +$hideok sp-docgen jt.md --output jt.html +$hideok sp-docgen jt.md --output jt.pdf -for md in [^CR]*.md -do - $hideok echo "$md =====================================" - codegen "$md" test.py - docgen "$md" "$(basename "$md" .md).pdf" - docgen "$md" "$(basename "$md" .md).html" - $hideok echo -done +$hideok sp-codegen jt.md --output test.py +rm -f test.log +$hideok python3 test.py --log test.log "$@" echo "Everything seems to be in order." -- cgit v1.2.1