X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=t%2Ftests.t;h=ad7a2620880075c1f2cbd02893387b33366f93f5;hp=0e1833e34e040139082360a3939fb9ca406b8209;hb=e8c9cdc7a80e630245d179fd702de3c8beb12abb;hpb=23020a59781f2a07a8d56053972d14c6d3cae2b3 diff --git a/t/tests.t b/t/tests.t index 0e1833e..ad7a262 100644 --- a/t/tests.t +++ b/t/tests.t @@ -1,6 +1,6 @@ # Tests for blhc. # -# Copyright (C) 2012 Simon Ruderich +# Copyright (C) 2012-2013 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 196; +use Test::More tests => 208; sub is_blhc { @@ -61,7 +61,7 @@ is_blhc '', '', 2, $usage; is_blhc '', '--version', 0, - 'blhc 0.03 Copyright (C) 2012 Simon Ruderich + 'blhc 0.04 Copyright (C) 2012-2013 Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -651,6 +651,10 @@ CFLAGS missing (-Werror=format-security): cd /tmp/test/src && /usr/bin/gcc -g -O is_blhc 'configure', '', 1, $empty; +is_blhc 'configure-check', '', 4, + 'NONVERBOSE BUILD: CC = gcc -std=gnu99 -std=gnu99 test.c +'; + is_blhc 'make', '', 1, $empty; @@ -750,8 +754,7 @@ LDFLAGS missing (-fPIE -pie -Wl,-z,relro -Wl,-z,now): g++-4.6 -Wl,-z,defs -o tes # ada -is_blhc 'ada', '', 8, - 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc-4.6 -c -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security test.c +my $ada = 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc-4.6 -c -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security test.c LDFLAGS missing (-Wl,-z,relro): /usr/bin/gcc-4.6 -shared -lgnat-4.6 -o libtest.so.2 test-a.o test-b.o test-c.o -Wl,--as-needed CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security): gcc -c -g -O2 test.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c -g -O2 test.c @@ -759,6 +762,10 @@ CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=for CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 test.c LDFLAGS missing (-Wl,-z,relro): gcc -g -O2 test.c '; +is_blhc 'ada', '', 8, + $ada; +is_blhc 'ada-pbuilder', '', 8, + $ada; # libtool @@ -827,6 +834,12 @@ LDFLAGS missing (-pie -Wl,-z,relro): gcc -fPIE -o test test.o '; +# architecture in older buildd logs + +is_blhc 'dpkg-buildpackage-architecture-old', '', 0, + ''; + + # ignore architecture is_blhc ['arch-avr32', 'arch-i386', 'empty', 'arch-mipsel'], @@ -871,6 +884,10 @@ my $debian_hardening_wrapper = '; is_blhc 'debian-hardening-wrapper', '', 16, $debian_hardening_wrapper; +is_blhc 'debian-hardening-wrapper-old-build-depends', '', 16, + $debian_hardening_wrapper; +is_blhc 'debian-hardening-wrapper-pbuilder', '', 16, + $debian_hardening_wrapper; # false positives @@ -903,6 +920,9 @@ is_blhc 'buildd-dpkg-dev-missing', '--buildd', 0, is_blhc 'debian-hardening-wrapper', '--buildd', 0, 'I-hardening-wrapper-used|| '; +is_blhc 'debian-hardening-wrapper-pbuilder', '--buildd', 0, + 'I-hardening-wrapper-used|| +'; is_blhc 'buildd-verbose-build', '--buildd', 0, 'W-compiler-flags-hidden|1 (of 5) hidden|