components/curl/patches/009-runtests.pl.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 05 Aug 2015 10:48:38 -0700
changeset 4742 8f6fdd91de07
parent 2151 8977d970976a
permissions -rw-r--r--
15802265 SUNBT7182198 include r programming language in solaris (disable parfait)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1501
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
The various curl NTLM tests try to LD_PRELOAD a test library
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
called .../tests/libtest/.libs/libhostname.so that's been
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
created as a pre-requisite to running the numerous Perl tests.
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
This patch adjusts LD_PRELOAD to be LD_PRELOAD_32 or LD_PRELOAD_64
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
depending upong whether we are running the 32 or 64 bit tests.
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
As this is Solaris specific, this patch will not be pushed upstream.
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
2151
8977d970976a PSARC 2014/332 curl version 7.38.0
Rich Burridge <rich.burridge@oracle.com>
parents: 1501
diff changeset
    10
--- tests/runtests.pl.orig	2014-09-10 12:26:52.624143266 -0700
8977d970976a PSARC 2014/332 curl version 7.38.0
Rich Burridge <rich.burridge@oracle.com>
parents: 1501
diff changeset
    11
+++ tests/runtests.pl	2014-09-10 16:51:13.663390869 -0700
8977d970976a PSARC 2014/332 curl version 7.38.0
Rich Burridge <rich.burridge@oracle.com>
parents: 1501
diff changeset
    12
@@ -3060,6 +3060,12 @@
1501
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
                             # print "Skipping LD_PRELOAD due to no release shared build\n";
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
                             next;
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
                         }
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
+                        # make this LD_PRELOAD_{bits}
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
+                        open(FP, "/bin/file $content |");
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
+                        my $bits = <FP>;
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
+                        if ($bits =~ /^.+ELF\s(\d\d)-bit.+$/) {
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
+                            $var .= '_'.$1;
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
+                        }
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
                     }
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
                     $ENV{$var} = "$content";
8be4b9d44152 15941200 curl "gmake test" failures
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
                 }