commit a6ec8f3ffe13ffa43c7db9332ac37b15a57ca623 parent f4aff083b1dc674269f32e9944e40ed6c4c21320 Author: Wilson Gheen <wilson@wilsonrgheen.com> Date: Sat, 26 Nov 2022 04:49:20 -0600 Make Makefile store results of last test Diffstat:
M | Makefile | | | 9 | ++++++--- |
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile @@ -22,8 +22,11 @@ bbl: bbl.sh bbl.awk readings/*/*.tsv readings/*/*.aliases chmod +x $@ test: bbl.sh input.awk bbl.awk - shellcheck -s sh -S error bbl.sh - echo -n | gawk --lint=fatal -f input.awk -f bbl.awk + @{ shellcheck -s sh -S error bbl.sh; \ + echo -n | gawk --lint=fatal -f input.awk -f bbl.awk; } 2>&1 \ + | grep -v 'warning: turning off `--lint' | tee test || true + @{ [ "$$(wc -l test | cut -d' ' -f1)" = 0 ] && echo "PASSED" || echo "FAILED"; } | tee -a test + clean: rm -f bbl @@ -36,4 +39,4 @@ install: bbl uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/bbl -.PHONY: test clean install uninstall +.PHONY: clean install uninstall