t/logs/bad-multiline
t/logs/buildd-dpkg-dev
t/logs/buildd-dpkg-dev-old
+t/logs/buildd-package-details
t/logs/c++
t/logs/cc
t/logs/configure
# false positives.
$start = 1 if $line =~ /^dpkg-buildpackage:/;
next if not $start;
+ # And stop at the end of the build log. Package details (reported by the
+ # buildd logs) are not important for us. This also prevents false
+ # positives.
+ last if $line =~ /^Build finished at \d{8}-\d{4}$/;
# Detect architecture automatically unless overridden.
if (not $option_arch
--- /dev/null
+Toolchain package versions: ... dpkg-dev_1.16.1.2 ...
+dpkg-buildpackage: source package test
+
+gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-a.c
+gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-b.c
+gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-c.c
+gcc -g -O3 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -c test-d.c
+gcc -Wl,-z,relro -o test test-a.o test-b.o test-c.o -ltest
+
+Build finished at 20120308-1648
+# Everything after this is ignored.
+
+gcc -g -O2 -c test-a.c
+gcc -g -O2 -c test-b.c
+gcc -g -O2 -c test-c.c
+gcc -o test test-a.o test-b.o test-c.o -ltest
use strict;
use warnings;
-use Test::More tests => 84;
+use Test::More tests => 86;
sub is_blhc {
# buildd support
+is_blhc 'buildd-package-details', '--buildd', 0,
+ '';
+
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