]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - t/tests.t
Release 0.08
[blhc/blhc.git] / t / tests.t
index 6e664952b3c881c703faa533ecdb3c3997789cf3..052a1fda7f186c88bd05e4d08375d3bb701d82d7 100644 (file)
--- a/t/tests.t
+++ b/t/tests.t
@@ -1,6 +1,6 @@
 # Tests for blhc.
 #
-# Copyright (C) 2012-2017  Simon Ruderich
+# Copyright (C) 2012-2018  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 => 216;
+use Test::More tests => 234;
 
 
 sub is_blhc {
@@ -67,7 +67,7 @@ is_blhc '', '', 2,
         $usage;
 
 is_blhc '', '--version', 0,
-        'blhc 0.07  Copyright (C) 2012-2017  Simon Ruderich
+        'blhc 0.08  Copyright (C) 2012-2018  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
@@ -635,6 +635,8 @@ NONVERBOSE BUILD: Compiling test.c \     gcc test.c
 NONVERBOSE BUILD: [  3%] Building CXX object scribus/text/CMakeFiles/scribus_text_lib.dir/frect.cpp.o
 ';
 
+is_blhc 'parallel', '', 0, '';
+
 
 # handle debug builds
 
@@ -650,6 +652,10 @@ is_blhc 'configure-check', '', 4,
         'NONVERBOSE BUILD:   CC              = gcc -std=gnu99 -std=gnu99 test.c
 ';
 
+is_blhc 'configure-check', '--line-numbers', 4,
+        '5:NONVERBOSE BUILD:   CC              = gcc -std=gnu99 -std=gnu99 test.c
+';
+
 is_blhc 'make', '', 1,
         $empty;
 
@@ -765,6 +771,19 @@ is_blhc 'ada-pbuilder', '', 8,
         $ada;
 
 
+# fortran
+
+is_blhc 'fortran', '', 8,
+        'CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -Wl,-z,relro -o balls balls.f
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132  -c -o quadric.o quadric.f
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132  -c -o suv.o suv.f
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 \ rastep.f quadric.o suv.o -Wl,-z,relro \ -o rastep
+CFLAGS missing (-fstack-protector-strong): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132  -c -o render.o render.f
+LDFLAGS missing (-Wl,-z,relro): gfortran -g -w -O2 -Wtabs -ffixed-line-length-132 -fstack-protector-strong -o balls-without-ldflags balls.f
+CFLAGS missing (-fstack-protector-strong): mpifort -cpp -DDOUB -g -O2 -fdebug-prefix-map=/«PKGBUILDDIR»=. -c -o transform.o transform.f90
+';
+
+
 # libtool
 
 is_blhc 'libtool', '--bindnow', 12,
@@ -871,6 +890,15 @@ 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', '--line-numbers', 8,
+        '9:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -g -O2 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security -Wall -c test.c
+13:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c `dpkg-buildflags --get CFLAGS` test.c
+14:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): g++ -c `dpkg-buildflags --get CXXFLAGS` test.cc
+15:CFLAGS missing (-g -O2 -fstack-protector-strong -Wformat -Werror=format-security): gcc -c `dpkg-buildflags --get LDFLAGS` test.c
+15:CPPFLAGS missing (-D_FORTIFY_SOURCE=2): gcc -c `dpkg-buildflags --get LDFLAGS` test.c
+19:LDFLAGS missing (-Wl,-z,relro): gcc -o test test.o `dpkg-buildflags --get CFLAGS`
+';
+
 is_blhc 'debian-cmake', '', 32,
         'INVALID CMAKE: 2.8.7-1
 ';
@@ -918,6 +946,15 @@ is_blhc 'buildd-dpkg-dev-missing', '--buildd', 0,
         'W-dpkg-buildflags-missing|CFLAGS 3 (of 6), CXXFLAGS 1 (of 1) missing|
 ';
 
+is_blhc 'buildd-gcc-pie', '--buildd --all', 0,
+        'W-dpkg-buildflags-missing|CFLAGS 1 (of 1), LDFLAGS 1 (of 1) missing|
+';
+is_blhc 'buildd-gcc-pie-builtin-wrong-arch', '--buildd --all', 0,
+        'W-dpkg-buildflags-missing|CFLAGS 1 (of 1), LDFLAGS 1 (of 1) missing|
+';
+is_blhc 'buildd-gcc-pie-builtin', '--buildd', 0, '';
+is_blhc 'buildd-gcc-pie-builtin', '--buildd --all', 0, '';
+
 # Older dpkg versions use -fstack-protector instead of -strong.
 is_blhc 'buildd-dpkg-fstack-protector', '--buildd', 0,
         '';
@@ -945,6 +982,11 @@ is_blhc 'debian-cmake', '--buildd', 0,
 ';
 
 
+# debian specific settings
+
+is_blhc 'debian-gcc-pie', '--debian', 0, '';
+
+
 # multiple files
 
 is_blhc ['good', 'good-pie', 'good-bindnow', 'good-all', 'good-multiline', 'good-library'], '', 0,