X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=t%2Ftests.t;h=09c22f158aa57a005251a3bb32a4d6e9f4ec08a0;hb=176279c453afed1e0aab9db5283a92b1e92e1fb1;hp=2a519a92e82fec18c9caf6f1b486f4e589c822a3;hpb=ea4a36f6673fe09075554d52d327149469d427a7;p=blhc%2Fblhc.git diff --git a/t/tests.t b/t/tests.t index 2a519a9..09c22f1 100644 --- a/t/tests.t +++ b/t/tests.t @@ -19,7 +19,7 @@ use strict; use warnings; -use Test::More tests => 80; +use Test::More tests => 84; sub is_blhc { @@ -50,6 +50,7 @@ Usage: --bindnow force +bindbow check --all force +all (+pie, +bindnow) check --arch set architecture (autodetected) + --buildd parser mode for buildds '; @@ -281,11 +282,12 @@ CFLAGS missing (-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat): g CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -Wformat-security -Werror=format-security -c test-b.c CFLAGS missing (-O2): gcc -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c test-a.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c test-a.c -CFLAGS missing (-g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -O2 -D_FORTIFY_SOURCE=2 -c test-b.c +CFLAGS missing (-g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): \ gcc -O2 -D_FORTIFY_SOURCE=2 -c test-b.c CFLAGS missing (-fstack-protector): gcc -g -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c test-a.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -c test-a.c -CFLAGS missing (-g -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -D_FORTIFY_SOURCE=2 -fstack-protector -c test-b.c +CFLAGS missing (-g -O2 --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): \ gcc -D_FORTIFY_SOURCE=2 -fstack-protector -c test-b.c CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security \; -Werror=format-security -D_FORTIFY_SOURCE=1 -c test-a.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): \ gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=1 -c test-b.c '; is_blhc 'bad-library', '--all', 8, @@ -295,6 +297,7 @@ LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -shared -fPIC -DPIC libtest.o -lp LDFLAGS missing (-Wl,-z,now): gcc -shared -fPIC test.o -Wl,-z -Wl,relro -o .libs/libtest.so.1.0.0 LDFLAGS missing (-fPIE -pie -Wl,-z,relro): gcc -shared -o libtest.so.0d ./test-a.o test/./test-b.o -Wl,-z,now -lpthread -ldl LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): /usr/bin/g++ -shared -fpic -o libtest-6.1.so.0 test.o -ltiff -lz +LDFLAGS missing (-Wl,-z,relro -Wl,-z,now): gcc -Wl,--as-needed -fPIE -pie -o test.cgi test.o -lgcrypt '; @@ -307,6 +310,25 @@ NONVERBOSE BUILD: CC libtest-b.lo NONVERBOSE BUILD: CC libtest_c.lo NONVERBOSE BUILD: CC libtest-d.lo NONVERBOSE BUILD: CCLD libtest.la +NONVERBOSE BUILD: LINK libtest.la +NONVERBOSE BUILD: CXX libtest-a.lo +NONVERBOSE BUILD: CXX libtest-b.lo +NONVERBOSE BUILD: CXX libtest_c.lo +NONVERBOSE BUILD: CXX libtest-d.lo +NONVERBOSE BUILD: CXXLD libtest.la +NONVERBOSE BUILD: [CC] src/test-a.o +NONVERBOSE BUILD: [CC] src/test-b.o +NONVERBOSE BUILD: [CC] src/test_c.o +NONVERBOSE BUILD: [CXX] src/test-d.o +NONVERBOSE BUILD: [LD] src/test.o +NONVERBOSE BUILD: [CC] src/test-a.o +NONVERBOSE BUILD: [CC] src/test-b.o +NONVERBOSE BUILD: [CC] src/test_c.o +NONVERBOSE BUILD: [LD] src/test.o +NONVERBOSE BUILD: [CC] src/test-a.o +NONVERBOSE BUILD: [CC] src/test-b.o +NONVERBOSE BUILD: [CC] src/test_c.o +NONVERBOSE BUILD: [LD] src/test.o NONVERBOSE BUILD: CC modules/server/test.c NONVERBOSE BUILD: Compiling test/test.cc to ../build/test/test.o NONVERBOSE BUILD: Building shared library ../build/test/libtest.so.1.2.3 @@ -328,8 +350,9 @@ CFLAGS missing (-Werror=format-security): cd /tmp/test/src && /usr/bin/gcc -g -O # configure -is_blhc 'configure', '', 0, - ''; +is_blhc 'configure', '', 1, + 'No compiler commands! +'; # cc @@ -356,13 +379,6 @@ LDFLAGS missing (-fPIE -pie -Wl,-z,now): gcc-4.6 -Wl,-z,defs test-a.o test-b.o t '; -# debian - -is_blhc 'debian', '', 8, - 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c -'; - - # c++ is_blhc 'c++', '--pie --bindnow', 8, @@ -452,3 +468,36 @@ is_blhc 'arch-mipsel', '', 8, 'CFLAGS missing (-Werror=format-security): gcc -D_FORTIFY_SOURCE=2 -g -O2 -Wformat -Wformat-security -Wall -c test.c LDFLAGS missing (-Wl,-z,relro): gcc -Wl,-z,now -o test test.o '; + + +# debian + +is_blhc 'debian', '', 8, + 'CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wall -c test.c +'; + + +# buildd support + +is_blhc 'buildd-dpkg-dev', '--buildd', 8, + 'CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -O2 -c test-a.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-a.c +CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -O2 -c test-b.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-b.c +CFLAGS missing (-fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -O2 -c test-c.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -c test-c.c +LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest +CFLAGS missing (-O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -c test-a.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -c test-a.c +CFLAGS missing (-O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -c test-b.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -c test-b.c +CFLAGS missing (-O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security): gcc -g -c test-c.c +CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -c test-c.c +LDFLAGS missing (-Wl,-z,relro): gcc -o test test-a.o test-b.o test-c.o -ltest +'; + +is_blhc 'buildd-dpkg-dev-old', '--buildd', 8, + 'CFLAGS missing (-O2): gcc -g -c test-a.c +CFLAGS missing (-O2): gcc -g -c test-b.c +CFLAGS missing (-O2): gcc -g -c test-c.c +';