components/serf/patches/fix-tests.patch
author Rich Burridge <rich.burridge@oracle.com>
Thu, 07 Jan 2016 13:22:27 -0800
changeset 5243 cb29cf94919d
child 7902 9e02778b84cd
permissions -rw-r--r--
PSARC 2015/152 serf - High-performance asynchronous HTTP client library 20780708 We should integrate serf into Solaris
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5243
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
Changes needed to get the serf tests to build on Solaris.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
Remove a C++ style comment.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
Run the tests in a fixed order.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
These changes will be passed upstream.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
--- serf-1.3.8/test/test_buckets.c.orig	2015-03-25 10:44:38.304724577 -0700
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
+++ serf-1.3.8/test/test_buckets.c	2015-03-25 10:45:28.821762949 -0700
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
@@ -1234,7 +1234,7 @@
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
        uncompressed data, + 12 bytes. This info comes from zlib.h.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
        Note: This isn't sufficient when using Z_NO_FLUSH and extremely compressed
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
        data. Use a buffer bigger than what we need. */
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
-//    buf_size = orig_len + (orig_len / 1000) + 12;
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
+/*    buf_size = orig_len + (orig_len / 1000) + 12; */
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
     buf_size = 100000;
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
 
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
     write_buf = apr_palloc(pool, buf_size);
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
--- serf-1.3.8/build/check.py.orig	2015-03-25 11:55:50.065102813 -0700
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
+++ serf-1.3.8/build/check.py	2015-03-25 11:56:17.277942011 -0700
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
@@ -42,7 +42,7 @@
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
   TEST_ALL_EXE = os.path.join(testdir, TEST_ALL_EXE)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
 
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
   # Find test responses and run them one by one
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
-  for case in glob.glob(testdir + "/testcases/*.response"):
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
+  for case in sorted(glob.glob(testdir + "/testcases/*.response")):
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
     print "== Testing %s ==" % (case)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
     try:
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
       subprocess.check_call([SERF_RESPONSE_EXE, case])