Package: pdl / 1:2.007-4

testsuite_fixes.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Index: pdl-2.007/t/config.t
===================================================================
--- pdl-2.007.orig/t/config.t	2013-05-12 20:09:47.000000000 +0000
+++ pdl-2.007/t/config.t	2014-09-25 07:43:14.000000000 +0000
@@ -19,7 +19,7 @@
    local $TODO = 'Known_problem sf.net bug #3030998' if ($PDL::Config{SKIP_KNOWN_PROBLEMS} or exists $ENV{SKIP_KNOWN_PROBLEMS} );
    
    # generate list of WITH_* keys from PDL::Config
-   my @keys = grep { /^WITH_/ } keys %PDL::Config;
+   my @keys = sort grep { /^WITH_/ } keys %PDL::Config;
    foreach my $key ( @keys ) {
       # there should be no undef values
       ok( defined $PDL::Config{$key} , "check $key in Config.pm" );
Index: pdl-2.007/t/flexraw_fortran.t
===================================================================
--- pdl-2.007.orig/t/flexraw_fortran.t	2013-09-14 15:07:45.000000000 +0000
+++ pdl-2.007/t/flexraw_fortran.t	2014-09-25 09:04:08.959415513 +0000
@@ -28,6 +28,8 @@
 
 my $exec = $^O =~ /win32/i ? '.exe' : '';
 my $null = $^O =~ /win32/i ? ' 2>nul' : ' 2>/dev/null';
+my $F77;
+my $F77flags;
 
 BEGIN{
 
@@ -44,13 +46,30 @@
    } elsif ($datalen > 70) {
       plan skip_all => "TEMPDIR path too long for f77 ($datalen chars), skipping all tests";
    } else {
-      eval " use ExtUtils::F77; ";
-      if ( $@ ) {
-         plan skip_all => "Skip all tests as ExtUtils::F77 not found"; 
-         exit 0;
+      if (exists $PDL::Config{F77CONF} && -f $PDL::Config{F77CONF}) {
+        print "loading F77 configuration from $PDL::Config{F77CONF}...\n";
+        eval "require '$PDL::Config{F77CONF}'";
+        if ($@ ne "") {
+	  plan skip_all => "F77CONF file not loaded";
+        }
+        $F77 = F77Conf::compiler();
+        $F77flags = F77Conf::cflags();
       } else {
-         plan tests => $ntests;
+        eval " use ExtUtils::F77; ";
+        if ( $@ ) {
+           plan skip_all => "Skip all tests as ExtUtils::F77 not found";
+           exit 0;
+        }
+        if ($ExtUtils::F77::VERSION > 1.03) {
+            $F77 = ExtUtils::F77::compiler();
+            $F77flags = ExtUtils::F77::cflags();
+        } else {
+            $F77 = 'f77';
+            $F77flags = '';
+        }
+
       }
+      plan tests => $ntests;
    }
 
     # Configuration
@@ -66,19 +85,6 @@
 
 }
 
-# use ExtUtils::F77;
-
-my $F77;
-my $F77flags;
-
-if ($ExtUtils::F77::VERSION > 1.03) {
-    $F77 = ExtUtils::F77::compiler();
-    $F77flags = ExtUtils::F77::cflags();
-} else {
-    $F77 = 'f77';
-    $F77flags = '';
-}
-
 sub tapprox {
     my ($a,$b) = @_;
     my $c = abs($a->clump(-1)-$b->clump(-1));
@@ -271,7 +277,7 @@
 c Program to test i/o of F77 unformatted files
       program rawtest
       implicit none
-      integer i
+      integer*4 i
       $f77type a($ndata)
       do i = 1, $ndata
         a(i) = $val
@@ -353,7 +359,7 @@
 c Program to test i/o of F77 unformatted files
       program rawtest
       implicit none
-      integer i
+      integer*4 i
       $f77type a($ndata)
       do i = 1, $ndata
         a(i) = $val
@@ -403,7 +409,7 @@
 c Program to test i/o of F77 unformatted files
       program rawtest
       implicit none
-      integer i
+      integer*4 i
       $f77type a($ndata)
       do i = 1, $ndata
         a(i) = $val
@@ -457,7 +463,7 @@
 c Program to test i/o of F77 unformatted files
       program rawtest
       implicit none
-      integer i, j
+      integer*4 i, j
       $f77type a($ndata, $ndata)
       do i = 1, $ndata
         do j = 1, $ndata