]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - t/tests.t
Add --debian to handle PIE flags like buildd mode
[blhc/blhc.git] / t / tests.t
index 648afb40715279cbdde047e614ba7ae94e561726..1ed4dd347d61da6a60c241ae649ca4eeb5f2d25e 100644 (file)
--- a/t/tests.t
+++ b/t/tests.t
@@ -1,6 +1,6 @@
 # Tests for blhc.
 #
-# Copyright (C) 2012-2016  Simon Ruderich
+# Copyright (C) 2012-2017  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 => 228;
 
 
 sub is_blhc {
@@ -67,7 +67,7 @@ is_blhc '', '', 2,
         $usage;
 
 is_blhc '', '--version', 0,
-        'blhc 0.07  Copyright (C) 2012-2016  Simon Ruderich
+        'blhc 0.07  Copyright (C) 2012-2017  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
@@ -765,6 +765,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,
@@ -918,6 +931,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 +967,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,