diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-03 15:14:08 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-03 15:14:08 -0400 |
| commit | 75b703236355de1ac2837828fdae9b6fdd198c28 (patch) | |
| tree | 7f168ce768ae4bc5380105ccd5f672dcda8b41d0 | |
| parent | 82849ba783e2b8f8e3a040751cd964313470e7f2 (diff) | |
Show error output on test failure
| -rw-r--r-- | Makefile | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -47,7 +47,12 @@ tags: $(CC) $(CFLAGS) -c $< -o $@ %.tm.testresult: %.tm tomo - VERBOSE=0 COLOR=1 CC=gcc O=1 ./tomo $< 2>$@ >$@ && cat $@ + @printf '\x1b[33;1;4m%s\x1b[m\n' $< + @set -o pipefail; \ + if ! VERBOSE=0 COLOR=1 CC=gcc O=1 ./tomo $< 2>&1 | tee $@; then \ + rm -f $@; \ + false; \ + fi test: $(TESTS) @echo -e '\x1b[32;7m ALL TESTS PASSED! \x1b[m' |
