source: MondoRescue/branches/stable/mondo/src/test/mktest@ 1064

Last change on this file since 1064 was 1064, checked in by Bruno Cornec, 17 years ago

More controls at the compiler level
still working with the problems around variable arguments

  • Property svn:executable set to *
File size: 731 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"
9OPT="-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"
10
11echo "Generating test-msg"
12gcc $OPT test-msg.c $lib -o test-msg
13echo "Generating test-string"
14gcc $OPT test-string.c ../lib/mr_str.c $lib -o test-string
15echo "Generating test-conf"
16gcc $OPT test-conf.c $lib -o test-conf
17
18for f in test-conf test-string test-msg; do
19 chmod 755 $f
20 ./$f > /tmp/$f.res
21 diff -q $f.res /tmp/$f.res
22 if [ $? -ne 0 ]; then
23 echo "$f test KO !!"
24 fi
25done
Note: See TracBrowser for help on using the repository browser.