~ubuntu-branches/ubuntu/hardy/dbacl/hardy

« back to all changes in this revision

Viewing changes to src/lint-check.sh

  • Committer: Bazaar Package Importer
  • Author(s): Zak B. Elep
  • Date: 2006-03-26 22:35:35 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060326223535-bo3m96paoczzz59n
Tags: 1.12-1
* New upstream release
  + `dbacl -V' now exits with status 0.  (Closes: #339394)
* debian/rules:
  + Upstream now fixes TREC file permissions.  However some new scripts got
    added, so this time its a a+x fix instead of a-x.
* debian/patches:
  + Removed 10_slang2_conversion.patch from Clint, now merged upstream.
  + Updated 20_autotools_update.patch .

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
# This isn't an ordinary regression test, but instead it runs splint
 
4
# on the source files in the src directory. If the user doesn't have
 
5
# splint, we do nothing and pretend success.
 
6
 
 
7
# splint is very fussy, and prints many spurious errors, which cannot
 
8
# all be fixed by editing the dbacl source code. In particular,
 
9
# nonstandard header files cause a problem, as do compiler
 
10
# idiosyncracies. So it is not a good idea to run the lint check as
 
11
# part of the regular regression tests, since it would make dbacl
 
12
# uncompilable on some systems.
 
13
 
 
14
# There are other issues such as the fact that dbacl uses realloc and
 
15
# splint can't deal with this properly. But overall, it's worth using
 
16
# it.
 
17
 
 
18
PATH=/bin:/usr/bin
 
19
SRCDIR=.
 
20
 
 
21
prerequisite_command() {
 
22
    type $2 2>&1 > /dev/null
 
23
    if [ 0 -ne $? ]; then
 
24
        echo "$1: $2 not found, test will be skipped"
 
25
        exit 77
 
26
    fi
 
27
}
 
28
 
 
29
prerequisite_command $0 splint
 
30
 
 
31
# This part is messy. Some source files need special preprocessor symbols,
 
32
# so I've chosen to run a separate splint command on each source file. 
 
33
# Ideally, this would be generated automatically by analysing the automake
 
34
# file, but I have no idea how to do it. Note that splint should only 
 
35
# check the dbacl files, not the public domain files included from elsewhere.
 
36
 
 
37
splint -f $SRCDIR/splintrc $SRCDIR/dbacl.c \
 
38
&& splint -f $SRCDIR/splintrc $SRCDIR/bayesol.c \
 
39
&& splint -f $SRCDIR/splintrc $SRCDIR/catfun.c \
 
40
&& splint -f $SRCDIR/splintrc $SRCDIR/const.c \
 
41
&& splint -f $SRCDIR/splintrc $SRCDIR/dbacl.c \
 
42
&& splint -f $SRCDIR/splintrc $SRCDIR/fh.c \
 
43
&& splint -f $SRCDIR/splintrc $SRCDIR/fram.c \
 
44
&& splint -f $SRCDIR/splintrc $SRCDIR/hmine.c \
 
45
&& splint -f $SRCDIR/splintrc $SRCDIR/hparse.c \
 
46
&& splint -f $SRCDIR/splintrc $SRCDIR/hypex.c \
 
47
&& splint -f $SRCDIR/splintrc $SRCDIR/mailinspect.c \
 
48
&& splint -f $SRCDIR/splintrc -DMBW_WIDE $SRCDIR/mbw.c \
 
49
&& splint -f $SRCDIR/splintrc -DMBW_MB $SRCDIR/mbw.c \
 
50
&& splint -f $SRCDIR/splintrc $SRCDIR/probs.c \
 
51
&& splint -f $SRCDIR/splintrc $SRCDIR/rfc2822.c \
 
52
&& splint -f $SRCDIR/splintrc $SRCDIR/rfc822.c \
 
53
&& splint -f $SRCDIR/splintrc $SRCDIR/util.c