diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-12-30 08:36:17 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-12-30 08:36:17 +0000 |
commit | bf77eb2d929a8536cd6e095da473eab5144c6695 (patch) | |
tree | b18be01130ea1409711b9cc407516c43892f3d62 | |
parent | ef5d694949cd5184267d70acb3ade2675abe3259 (diff) | |
parent | d6258d867f0627a065c1a4010f8164318371f196 (diff) | |
download | summain-rs-bf77eb2d929a8536cd6e095da473eab5144c6695.tar.gz |
Merge branch 'check-log' into 'main'
test: if test.py fails, tail log
See merge request larswirzenius/summain!31
-rwxr-xr-x | check | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -6,24 +6,21 @@ set -euo pipefail quiet=-q hideok= -if command -v chronic > /dev/null -then - hideok=chronic +if command -v chronic >/dev/null; then + hideok=chronic fi -if [ "$#" -gt 0 ] -then - case "$1" in +if [ "$#" -gt 0 ]; then + case "$1" in verbose | -v | --verbose) - quiet= - hideok= - ;; - esac + quiet= + hideok= + ;; + esac fi -got_cargo_cmd() -{ - cargo --list | grep " $1 " > /dev/null +got_cargo_cmd() { + cargo --list | grep " $1 " >/dev/null } # shellcheck disable=2086 @@ -38,6 +35,9 @@ subplot docgen summain.md -o summain.pdf subplot codegen summain.md -o test.py rm -f test.log -$hideok python3 test.py --log test.log "$@" +if ! $hideok python3 test.py --log test.log "$@"; then + tail -n500 test.log + exit 1 +fi echo "Everything seems to be in order." |