Last change
on this file since 3168 was 1139, checked in by Bruno Cornec, 18 years ago |
memory tests improvements
useless code removed from libmondo-fork.c
more merges for libmondo-archive.c
|
-
Property svn:executable
set to
*
|
File size:
874 bytes
|
Rev | Line | |
---|
[1054] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | #
|
---|
| 5 | # test script for library functions
|
---|
| 6 | #
|
---|
| 7 |
|
---|
[1139] | 8 | lib="../lib/mr_conf.c ../lib/mr_msg.c ../lib/mr_err.c ../lib/mr_mem.c ../lib/mr_str.c ../lib/mr_file.c"
|
---|
| 9 | OPT="-Wall -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -Wstrict-prototypes -Wshadow -funsigned-char -Wunused -Wcast-align -fno-strict-aliasing -O2 -g -I../common -I../include"
|
---|
[1054] | 10 |
|
---|
[1139] | 11 | prg="test-conf test-string test-msg test-mem"
|
---|
[1054] | 12 |
|
---|
[1139] | 13 | for i in $prg ; do
|
---|
| 14 | echo "Generating $i"
|
---|
| 15 | gcc $OPT $i.c $lib -o $i
|
---|
| 16 | done
|
---|
| 17 |
|
---|
[1065] | 18 | echo "Testing against previous run"
|
---|
[1139] | 19 | for f in $prg ; do
|
---|
[1054] | 20 | chmod 755 $f
|
---|
| 21 | ./$f > /tmp/$f.res
|
---|
| 22 | diff -q $f.res /tmp/$f.res
|
---|
| 23 | if [ $? -ne 0 ]; then
|
---|
| 24 | echo "$f test KO !!"
|
---|
[1104] | 25 | else
|
---|
| 26 | echo "$f test OK"
|
---|
[1054] | 27 | fi
|
---|
[1139] | 28 | done
|
---|
| 29 | for f in $prg ; do
|
---|
[1065] | 30 | valgrind -q --error-exitcode=1 --leak-check=yes ./$f 2>&1 > /tmp/valgrind-$f.res
|
---|
| 31 | if [ $? -ne 0 ]; then
|
---|
| 32 | echo "valgrind $f test KO !!"
|
---|
| 33 | fi
|
---|
[1054] | 34 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.