source: branches/stable/mondo/src/test/mktest @ 1156

Last change on this file since 1156 was 1139, checked in by Bruno Cornec, 14 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
Line 
1#!/bin/bash
2#
3# $Id$
4#
5# test script for library functions
6#
7
8lib="../lib/mr_conf.c ../lib/mr_msg.c ../lib/mr_err.c ../lib/mr_mem.c ../lib/mr_str.c ../lib/mr_file.c"
9OPT="-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"
10
11prg="test-conf test-string test-msg test-mem"
12
13for i in $prg ; do
14    echo "Generating $i"
15    gcc $OPT $i.c $lib -o $i
16done
17
18echo "Testing against previous run"
19for f in $prg ; 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    else
26        echo "$f test OK"
27    fi
28done
29for f in $prg ; do
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
34done
Note: See TracBrowser for help on using the repository browser.