abac0-leakabac0-mei
Last change
on this file since 2be12d2 was
2d56f83,
checked in by Mei <mei@…>, 11 years ago
|
1) overhaul the tests directory that now we can regression test against
a build directory or a installed setup
|
-
Property mode set to
100644
|
File size:
971 bytes
|
Rev | Line | |
---|
[3c30b59] | 1 | # |
---|
| 2 | # example_scripts |
---|
| 3 | # |
---|
[2d56f83] | 4 | |
---|
| 5 | EXPECTED_OKAY = 23 |
---|
[3c30b59] | 6 | |
---|
| 7 | DIRECTORY = c perl python wiki |
---|
[1afd681] | 8 | SUBDIRS = $(DIRECTORY) |
---|
[3c30b59] | 9 | |
---|
[2d56f83] | 10 | .PHONY : runcheck clean-local clean |
---|
[3c30b59] | 11 | all: runcheck |
---|
| 12 | |
---|
| 13 | clean-local: |
---|
[2d56f83] | 14 | clean: |
---|
[3c30b59] | 15 | @for i in $(DIRECTORY); do \ |
---|
| 16 | here=`pwd`; \ |
---|
| 17 | cd $$i; \ |
---|
| 18 | make -s clean; \ |
---|
| 19 | cd $$here; \ |
---|
| 20 | done |
---|
| 21 | @rm -rf result error |
---|
| 22 | |
---|
| 23 | runcheck: |
---|
| 24 | @echo 'running libabac SCRIPT testing...' | tee result |
---|
| 25 | @touch error; |
---|
| 26 | @for i in $(DIRECTORY); do \ |
---|
| 27 | here=`pwd`; \ |
---|
| 28 | cd $$i; \ |
---|
| 29 | printf "\n ==> RUN on %s\n" "$$i" >> $$here/result ; \ |
---|
| 30 | make -s |tee -a $$here/result |grep BAD >> $$here/error; \ |
---|
| 31 | cd $$here; \ |
---|
| 32 | done |
---|
| 33 | @if test -f error ; \ |
---|
| 34 | then \ |
---|
| 35 | (if test `cat error | wc -l ` -eq 0 ; \ |
---|
[2d56f83] | 36 | then \ |
---|
| 37 | (if test `grep GOOD result | wc -l ` -eq $(EXPECTED_OKAY) ; \ |
---|
| 38 | then echo " PASSED!!!"; \ |
---|
| 39 | else echo " ERROR, no error but not enough good results!!!"; \ |
---|
| 40 | fi); \ |
---|
[3c30b59] | 41 | else (echo " ERROR!!!"; cat error;); \ |
---|
| 42 | fi); \ |
---|
| 43 | else echo " PASSED"; \ |
---|
| 44 | fi |
---|
| 45 | |
---|
Note: See
TracBrowser
for help on using the repository browser.