Package: drupal7 Version: 7.14-2 Severity: normal Tags: patch wheezy Dear Maintainer,
Using the simpletest module fails for many if not all tests. Steps to reproduce: 1) enable the Testing module 2) in the Configuration menu, select Testing 3) check the checkbox next to Actions 4) click Run tests A large angry red wall of text appears after a few seconds. The expected result is a green message stating that the tests have succeeded. I've managed to find the fix in the drupal git repository: http://drupal.org/commitlog/commit/2/ec12b314fac08e638ff4ed152cb7412739941166 http://drupalcode.org/project/drupal.git/commit/ec12b31 This bug report describes the issue: http://drupal.org/node/1671200 Apparently drupal versions up to and including 7.16 are incompatible with curl 5.4.4 which happens to exactly the version in wheezy. Please add the above commit (attached) to the patches directory! Is there a possibility to still get this fix into wheezy? Thanks, -- System Information: Debian Release: 7.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Versions of packages drupal7 depends on: ii apache2 2.2.22-13 ii apache2-mpm-prefork [httpd] 2.2.22-13 ii curl 7.26.0-1+wheezy1 ii dbconfig-common 1.8.47+nmu1 ii debconf [debconf-2.0] 1.5.49 ii mysql-client 5.5.28+dfsg-1 ii mysql-client-5.5 [virtual-mysql-client] 5.5.28+dfsg-1 ii php5 5.4.4-14 ii php5-gd 5.4.4-14 ii php5-mysql 5.4.4-14 ii postfix [mail-transport-agent] 2.9.6-2 ii wwwconfig-common 0.2.2 Versions of packages drupal7 recommends: ii mysql-server 5.5.28+dfsg-1 drupal7 suggests no packages. -- debconf information excluded
commit ec12b314fac08e638ff4ed152cb7412739941166 Author: webchick <webch...@24967.no-reply.drupal.org> Date: Sat Aug 18 13:15:22 2012 +0200 Issue #1671200 by chx, sun, jaimealsilva: Fixed Simpletest broken on 5.4: CURLOPT_COOKIEJAR cannot be NULL on php5-curl version 5.4.4. diff --git a/modules/simpletest/drupal_web_test_case.php b/modules/simpletest/drupal_web_test_case.php index d83dbeb..19a6c94 100644 --- a/modules/simpletest/drupal_web_test_case.php +++ b/modules/simpletest/drupal_web_test_case.php @@ -1685,6 +1685,13 @@ class DrupalWebTestCase extends DrupalTestCase { if (!isset($this->curlHandle)) { $this->curlHandle = curl_init(); + + // Some versions/configurations of cURL break on a NULL cookie jar, so + // supply a real file. + if (empty($this->cookieFile)) { + $this->cookieFile = $this->public_files_directory . '/cookie.jar'; + } + $curl_options = array( CURLOPT_COOKIEJAR => $this->cookieFile, CURLOPT_URL => $base_url, @@ -1699,7 +1706,12 @@ class DrupalWebTestCase extends DrupalTestCase { $curl_options[CURLOPT_HTTPAUTH] = $this->httpauth_method; $curl_options[CURLOPT_USERPWD] = $this->httpauth_credentials; } - curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options); + // curl_setopt_array() returns FALSE if any of the specified options + // cannot be set, and stops processing any further options. + $result = curl_setopt_array($this->curlHandle, $this->additionalCurlOptions + $curl_options); + if (!$result) { + throw new Exception('One or more cURL options could not be set.'); + } // By default, the child session name should be the same as the parent. $this->session_name = session_name();