diff options
-rw-r--r-- | libglouglou/tests/Makefile | 13 | ||||
-rw-r--r-- | libglouglou/tests/README.txt | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/libglouglou/tests/Makefile b/libglouglou/tests/Makefile index bce183d..13f9de4 100644 --- a/libglouglou/tests/Makefile +++ b/libglouglou/tests/Makefile @@ -10,5 +10,18 @@ all: $(TARGET) $(TARGET): $(OBJECTS) $(CC) $(CFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJECTS) +run: + @errors=0 ;\ + for test in $(TARGET); do \ + echo -n "$$test " ;\ + LD_LIBRARY_PATH=../ ./$$test ;\ + if [ $$? -eq 0 ]; then \ + echo OK ;\ + else \ + echo FAILED ;\ + fi ;\ + done ;\ + exit $$errors + clean: rm -f $(TARGET) $(OBJECTS) diff --git a/libglouglou/tests/README.txt b/libglouglou/tests/README.txt new file mode 100644 index 0000000..fb19ae8 --- /dev/null +++ b/libglouglou/tests/README.txt @@ -0,0 +1,4 @@ +libglouglou unit tests + +do "make run" to execute them +returns the number of tests that failed |