X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=t%2Ftests.t;h=0b98fe3648a00e9be9a70b02bbc605d6308642be;hp=0d9281a583003b4f28d58624e00a9c9c5317119a;hb=f61763f97aa10059755d434556945465a4984aab;hpb=e8d66101e7bf4ba755df5c5f893402f98131fedf diff --git a/t/tests.t b/t/tests.t index 0d9281a..0b98fe3 100644 --- a/t/tests.t +++ b/t/tests.t @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 104; +use Test::More tests => 110; sub is_blhc { @@ -531,15 +531,19 @@ my $arch_avr32 = is_blhc 'arch-avr32', '', 8, $arch_avr32; -is_blhc 'arch-i386', '', 8, +my $arch_i386 = 'CFLAGS missing (-fstack-protector): gcc -D_FORTIFY_SOURCE=2 -g -O2 -fPIE --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c LDFLAGS missing (-pie): gcc -fPIE -Wl,-z,relro -Wl,-z,now -o test test.o '; +is_blhc 'arch-i386', '', 8, + $arch_i386; -is_blhc 'arch-ia64', '', 8, +my $arch_ia64 = 'CFLAGS missing (-fPIE): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c LDFLAGS missing (-pie): gcc -fPIE -o test test.o '; +is_blhc 'arch-ia64', '', 8, + $arch_ia64; is_blhc 'arch-mipsel', '', 8, 'CFLAGS missing (-Werror=format-security): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Wall -c test.c @@ -565,6 +569,10 @@ CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c `dpkg-buildflags --get LDFLAGS` t LDFLAGS missing (-Wl,-z,relro): gcc -o test test.o `dpkg-buildflags --get CFLAGS` '; +is_blhc 'debian-cmake', '', 32, + 'INVALID CMAKE: 2.8.7-2 +'; + my $debian_hardening_wrapper = 'HARDENING WRAPPER: no checks possible, aborting '; @@ -597,6 +605,10 @@ is_blhc 'make', '--buildd', 1, 'W-no-compiler-commands '; +is_blhc 'debian-cmake', '--buildd', 32, + 'W-invalid-cmake-used 2.8.7-2 +'; + # multiple files @@ -605,6 +617,9 @@ is_blhc ['good', 'good-pie', 'good-bindnow', 'good-all', 'good-multiline', 'good is_blhc ['good-all', 'good-library'], '--all', 0, ''; +is_blhc ['arch-i386', 'arch-ia64'], '', 8, + $arch_i386 . $arch_ia64; + # No exit when multiple files are specified. is_blhc ['bad-ldflags', 'empty', 'arch-avr32', 'debian-hardening-wrapper'], '', 25, $bad_ldflags