diff --git a/tests/.gitignore b/tests/.gitignore index d25e2d6249..7b70bccffc 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,3 +1,4 @@ +/gen/ /alloc /args /atof diff --git a/tests/Makefile b/tests/Makefile index 5136447c36..6c2a838d87 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -26,15 +26,32 @@ all: $(BINS) clean: rm -f $(BINS) *.out -expected: $(BINS) - mkdir -p expected - for bin in $(BINS); do "./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr"; done - run: $(BINS) - for bin in $(BINS); do echo "# $${bin} #"; "./$${bin}" test args; done + for bin in $(BINS); \ + do + echo "# $${bin} #"; \ + "./$${bin}" test args; \ + done -test: $(BINS) - for bin in $(BINS); do echo "# $${bin} #"; "./$${bin}" test args; done +expected: $(BINS) + rm -rf expected + mkdir -p expected + for bin in $(BINS); \ + do \ + echo "# $${bin} #"; \ + "./$${bin}" test args > "expected/$${bin}.stdout" 2> "expected/$${bin}.stderr"; \ + done + +verify: $(BINS) + rm -rf gen + mkdir -p gen + for bin in $(BINS); \ + do \ + echo "# $${bin} #"; \ + "./$${bin}" test args > "gen/$${bin}.stdout" 2> "gen/$${bin}.stderr"; \ + diff -u "gen/$${bin}.stdout" "expected/$${bin}.stdout"; \ + diff -u "gen/$${bin}.stderr" "expected/$${bin}.stderr"; \ + done GCCHEAD=\ -nostdinc \