Debian Codegraph @

debian/tests/basic-ignore

raw symbols SCIP
1 #!/bin/sh
2
3 # This test produces a temporary file with build lines without gcc hardening.
4 # These lines must be ignored by blhc (>= 0.12).
5
6 set -e
7
8 TMPFILE=$(mktemp)
9 trap "rm -f $TMPFILE" EXIT
10
11 echo "dpkg-buildpackage: source package test" > $TMPFILE
12 echo "" >> $TMPFILE
13
14 # Adding an ignore line
15 echo 'blhc: ignore-line-regexp: .*-o\ test\ test\.c' >> $TMPFILE
16
17 # The following example was taken from the README
18 echo "gcc -g -O2 -o test test.c" >> $TMPFILE
19
20 blhc $TMPFILE | grep missing && exit 1 || exit 0