components/curl/patches/011-runtests.pl.patch
branchs11-update
changeset 2824 ed80ca124641
equal deleted inserted replaced
2823:4650282513ce 2824:ed80ca124641
       
     1 The various curl NTLM tests try to LD_PRELOAD a test library
       
     2 called .../tests/libtest/.libs/libhostname.so that's been
       
     3 created as a pre-requisite to running the numerous Perl tests.
       
     4 
       
     5 This patch adjusts LD_PRELOAD to be LD_PRELOAD_32 or LD_PRELOAD_64
       
     6 depending upon whether we are running the 32 or 64 bit tests.
       
     7 
       
     8 As this is Solaris specific, this patch will not be pushed upstream.
       
     9 
       
    10 --- tests/runtests.pl.orig	2013-11-18 07:12:48.748872794 -0800
       
    11 +++ tests/runtests.pl	2013-11-18 07:15:32.604982653 -0800
       
    12 @@ -2405,10 +2405,21 @@
       
    13                      delete $ENV{$var} if($ENV{$var});
       
    14                  }
       
    15                  else {
       
    16 -                    if(($var =~ /^LD_PRELOAD/) &&
       
    17 -                       ($debug_build || ($has_shared ne "yes"))) {
       
    18 -                        # print "Skipping LD_PRELOAD due to no release shared build\n";
       
    19 -                        next;
       
    20 +                    if($var =~ /^LD_PRELOAD/) {
       
    21 +                        if(exe_ext() && (exe_ext() eq '.exe')) {
       
    22 +                            # print "Skipping LD_PRELOAD due to lack of OS support\n";
       
    23 +                            next;
       
    24 +                        }
       
    25 +                        if($debug_build || ($has_shared ne "yes")) {
       
    26 +                            # print "Skipping LD_PRELOAD due to no release shared build\n";
       
    27 +                            next;
       
    28 +                        }
       
    29 +                        # make this LD_PRELOAD_{bits}
       
    30 +                        open(FP, "/bin/file $content |");
       
    31 +                        my $bits = <FP>;
       
    32 +                        if ($bits =~ /^.+ELF\s(\d\d)-bit.+$/) {
       
    33 +                            $var .= '_'.$1;
       
    34 +                        }
       
    35                      }
       
    36                      $ENV{$var} = "$content";
       
    37                  }