From: Simon Ruderich Date: Wed, 11 Apr 2012 11:40:24 +0000 (+0200) Subject: Don't recognize options which contain compiler names as compiler lines. X-Git-Tag: 0.01~12 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=d6333e474554290abc21a27bbd1de7e0be1a4e10;p=blhc%2Fblhc.git Don't recognize options which contain compiler names as compiler lines. For example "-c++". --- diff --git a/MANIFEST b/MANIFEST index 4df8ddb..c714bdc 100644 --- a/MANIFEST +++ b/MANIFEST @@ -28,6 +28,7 @@ t/logs/debian-cmake-2 t/logs/debian-cmake-ok t/logs/debian-hardening-wrapper t/logs/empty +t/logs/false-positives t/logs/g++ t/logs/gcc t/logs/good diff --git a/bin/blhc b/bin/blhc index 4682d9b..1d35e0b 100755 --- a/bin/blhc +++ b/bin/blhc @@ -31,6 +31,7 @@ our $VERSION = '0.01'; # Regex to catch compiler commands. my $cc_regex = qr/ + (? 130; +use Test::More tests => 132; sub is_blhc { @@ -475,12 +475,10 @@ CFLAGS missing (-Werror=format-security): cd /tmp/test/src && /usr/bin/gcc -g -O # configure/make is_blhc 'configure', '', 1, - 'No compiler commands! -'; + $empty; is_blhc 'make', '', 1, - 'No compiler commands! -'; + $empty; @@ -660,6 +658,12 @@ is_blhc 'debian-hardening-wrapper', '', 16, $debian_hardening_wrapper; +# false positives + +is_blhc 'false-positives', '', 1, + $empty; + + # buildd support is_blhc 'empty', '--buildd', 1,