Last change
on this file since 1094 was 1065, checked in by Bruno Cornec, 17 years ago |
More tests in
mr_msg function doesn't cascade to _mr_msg anymore, as it doesn't seem to work correctly with multiple varargs entries (I've not found how to do it correctly, so I give up for the moment)
lib code pass valgrind without issue.
|
-
Property svn:executable
set to
*
|
File size:
908 bytes
|
Rev | Line | |
---|
[1054] | 1 | #!/bin/bash
|
---|
| 2 | #
|
---|
| 3 | # $Id$
|
---|
| 4 | #
|
---|
| 5 | # test script for library functions
|
---|
| 6 | #
|
---|
| 7 |
|
---|
| 8 | lib="../lib/mr_conf.c ../lib/mr_msg.c ../lib/mr_err.c ../lib/mr_mem.c"
|
---|
[1064] | 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 -Winit-self -Wcast-align -O2 -g -I../common -I../include"
|
---|
[1054] | 10 |
|
---|
| 11 | echo "Generating test-msg"
|
---|
[1064] | 12 | gcc $OPT test-msg.c $lib -o test-msg
|
---|
[1054] | 13 | echo "Generating test-string"
|
---|
[1064] | 14 | gcc $OPT test-string.c ../lib/mr_str.c $lib -o test-string
|
---|
[1054] | 15 | echo "Generating test-conf"
|
---|
[1064] | 16 | gcc $OPT test-conf.c $lib -o test-conf
|
---|
[1054] | 17 |
|
---|
[1065] | 18 | echo "Testing against previous run"
|
---|
[1054] | 19 | for f in test-conf test-string test-msg; do
|
---|
| 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 !!"
|
---|
| 25 | fi
|
---|
[1065] | 26 | valgrind -q --error-exitcode=1 --leak-check=yes ./$f 2>&1 > /tmp/valgrind-$f.res
|
---|
| 27 | if [ $? -ne 0 ]; then
|
---|
| 28 | echo "valgrind $f test KO !!"
|
---|
| 29 | fi
|
---|
[1054] | 30 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.