cvs: php-src(PHP_5_3) /ext/mysql/tests 002.phpt 003.phpt connect.inc mysql_affected_rows.phpt mysql_client_encoding.phpt mysql_close.phpt
mysql_constants.phpt mysql_data_seek.phpt mysql_db_name.phpt mysql_db_query.phpt mysql_errno.phpt mysql_error.phpt mysql_max_persistent.phpt
mysql_trace_mode.phpt skipifconnectfailure.inc

From: Date: Fri, 12 Oct 2007 11:57:18 +0000
Subject: cvs: php-src(PHP_5_3) /ext/mysql/tests 002.phpt 003.phpt connect.inc mysql_affected_rows.phpt mysql_client_encoding.phpt mysql_close.phpt
mysql_constants.phpt mysql_data_seek.phpt mysql_db_name.phpt mysql_db_query.phpt mysql_errno.phpt mysql_error.phpt mysql_max_persistent.phpt
mysql_trace_mode.phpt skipifconnectfailure.inc
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-46656@lists.php.net to get a copy of this message
uw Fri Oct 12 11:57:18 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mysql/tests connect.inc skipifconnectfailure.inc mysql_trace_mode.phpt mysql_max_persistent.phpt mysql_error.phpt mysql_errno.phpt mysql_db_query.phpt mysql_db_name.phpt mysql_data_seek.phpt mysql_constants.phpt mysql_close.phpt mysql_client_encoding.phpt mysql_affected_rows.phpt 003.phpt 002.phpt Log: Trying to skip tests if they can't connect to the DB server. Currently they have failed by default. Note also the environment variable MYSQL_TEST_SKIP_CONNECT_FAILURE to control the default (skip or fail)

http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/connect.inc?r1=1.1.8.1&r2=1.1.8.2&diff_format=u Index: php-src/ext/mysql/tests/connect.inc diff -u php-src/ext/mysql/tests/connect.inc:1.1.8.1 php-src/ext/mysql/tests/connect.inc:1.1.8.2 --- php-src/ext/mysql/tests/connect.inc:1.1.8.1 Wed Oct 10 09:47:21 2007 +++ php-src/ext/mysql/tests/connect.inc Fri Oct 12 11:57:18 2007 @@ -43,7 +43,7 @@ } /* -Default values are "localhost", "root", database "phptest" and empty password. +Default values are "localhost", "root", database "test" and empty password. Change the MYSQL_TEST_* environment values if you want to use another configuration. */ @@ -54,6 +54,7 @@ $db = getenv("MYSQL_TEST_DB") ? getenv("MYSQL_TEST_DB") : "test"; $engine = getenv("MYSQL_TEST_ENGINE") ? getenv("MYSQL_TEST_ENGINE") : "MyISAM"; $socket = getenv("MYSQL_TEST_SOCKET") ? getenv("MYSQL_TEST_SOCKET") : null; +$skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ? getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") : true; /* Development setting: test experimal features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/skipifconnectfailure.inc?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/mysql/tests/skipifconnectfailure.inc diff -u php-src/ext/mysql/tests/skipifconnectfailure.inc:1.1.2.2 php-src/ext/mysql/tests/skipifconnectfailure.inc:1.1.2.3 --- php-src/ext/mysql/tests/skipifconnectfailure.inc:1.1.2.2 Wed Oct 10 09:49:37 2007 +++ php-src/ext/mysql/tests/skipifconnectfailure.inc Fri Oct 12 11:57:18 2007 @@ -1,17 +1,17 @@ <?php -$skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ? getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") : false; +require_once('connect.inc'); if ($skip_on_connect_failure) { if ($socket) $myhost = sprintf("%s:%s", $host, $socket); else if ($port) $myhost = sprintf("%s:%s", $host, $port); - + if (!$link = @mysql_connect($myhost, $user, $passwd, true)) die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysql_errno(), mysql_error())); if (!@mysql_select_db($db, $link)) die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysql_errno(), mysql_error())); - + mysql_close($link); } ?> \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_trace_mode.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/mysql/tests/mysql_trace_mode.phpt diff -u php-src/ext/mysql/tests/mysql_trace_mode.phpt:1.1.2.1 php-src/ext/mysql/tests/mysql_trace_mode.phpt:1.1.2.2 --- php-src/ext/mysql/tests/mysql_trace_mode.phpt:1.1.2.1 Wed Oct 10 09:56:48 2007 +++ php-src/ext/mysql/tests/mysql_trace_mode.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql.trace_mode=1 --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --INI-- mysql.trace_mode=1 error_reporting=E_ALL | E_NOTICE | E_STRICT http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_max_persistent.phpt?r1=1.1.2.1&r2=1.1.2.2&diff_format=u Index: php-src/ext/mysql/tests/mysql_max_persistent.phpt diff -u php-src/ext/mysql/tests/mysql_max_persistent.phpt:1.1.2.1 php-src/ext/mysql/tests/mysql_max_persistent.phpt:1.1.2.2 --- php-src/ext/mysql/tests/mysql_max_persistent.phpt:1.1.2.1 Wed Oct 10 09:55:28 2007 +++ php-src/ext/mysql/tests/mysql_max_persistent.phpt Fri Oct 12 11:57:18 2007 @@ -3,6 +3,7 @@ --SKIPIF-- <?php require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); require_once('connect.inc'); $link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket); http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_error.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_error.phpt diff -u php-src/ext/mysql/tests/mysql_error.phpt:1.2.2.2 php-src/ext/mysql/tests/mysql_error.phpt:1.2.2.3 --- php-src/ext/mysql/tests/mysql_error.phpt:1.2.2.2 Wed Oct 10 09:51:45 2007 +++ php-src/ext/mysql/tests/mysql_error.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_error() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include "connect.inc"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_errno.phpt?r1=1.3.2.2&r2=1.3.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_errno.phpt diff -u php-src/ext/mysql/tests/mysql_errno.phpt:1.3.2.2 php-src/ext/mysql/tests/mysql_errno.phpt:1.3.2.3 --- php-src/ext/mysql/tests/mysql_errno.phpt:1.3.2.2 Wed Oct 10 09:51:45 2007 +++ php-src/ext/mysql/tests/mysql_errno.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_errno() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include "connect.inc"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_db_query.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_db_query.phpt diff -u php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.2 php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.3 --- php-src/ext/mysql/tests/mysql_db_query.phpt:1.2.2.2 Wed Oct 10 09:53:34 2007 +++ php-src/ext/mysql/tests/mysql_db_query.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_db_query() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include "connect.inc"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_db_name.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_db_name.phpt diff -u php-src/ext/mysql/tests/mysql_db_name.phpt:1.2.2.2 php-src/ext/mysql/tests/mysql_db_name.phpt:1.2.2.3 --- php-src/ext/mysql/tests/mysql_db_name.phpt:1.2.2.2 Wed Oct 10 09:53:34 2007 +++ php-src/ext/mysql/tests/mysql_db_name.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_db_name() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include "connect.inc"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_data_seek.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_data_seek.phpt diff -u php-src/ext/mysql/tests/mysql_data_seek.phpt:1.2.2.2 php-src/ext/mysql/tests/mysql_data_seek.phpt:1.2.2.3 --- php-src/ext/mysql/tests/mysql_data_seek.phpt:1.2.2.2 Wed Oct 10 09:53:34 2007 +++ php-src/ext/mysql/tests/mysql_data_seek.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_data_seek() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include "connect.inc"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_constants.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_constants.phpt diff -u php-src/ext/mysql/tests/mysql_constants.phpt:1.2.2.2 php-src/ext/mysql/tests/mysql_constants.phpt:1.2.2.3 --- php-src/ext/mysql/tests/mysql_constants.phpt:1.2.2.2 Wed Oct 10 09:51:45 2007 +++ php-src/ext/mysql/tests/mysql_constants.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- Constants exported by ext/mysql --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php require("connect.inc"); http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_close.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_close.phpt diff -u php-src/ext/mysql/tests/mysql_close.phpt:1.2.2.2 php-src/ext/mysql/tests/mysql_close.phpt:1.2.2.3 --- php-src/ext/mysql/tests/mysql_close.phpt:1.2.2.2 Wed Oct 10 09:51:45 2007 +++ php-src/ext/mysql/tests/mysql_close.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_close() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include "connect.inc"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_client_encoding.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_client_encoding.phpt diff -u php-src/ext/mysql/tests/mysql_client_encoding.phpt:1.2.2.2 php-src/ext/mysql/tests/mysql_client_encoding.phpt:1.2.2.3 --- php-src/ext/mysql/tests/mysql_client_encoding.phpt:1.2.2.2 Wed Oct 10 09:51:45 2007 +++ php-src/ext/mysql/tests/mysql_client_encoding.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_client_encoding() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include_once "connect.inc"; http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/mysql_affected_rows.phpt?r1=1.3.2.2&r2=1.3.2.3&diff_format=u Index: php-src/ext/mysql/tests/mysql_affected_rows.phpt diff -u php-src/ext/mysql/tests/mysql_affected_rows.phpt:1.3.2.2 php-src/ext/mysql/tests/mysql_affected_rows.phpt:1.3.2.3 --- php-src/ext/mysql/tests/mysql_affected_rows.phpt:1.3.2.2 Wed Oct 10 09:51:45 2007 +++ php-src/ext/mysql/tests/mysql_affected_rows.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_affected_rows() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include_once("connect.inc"); http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/003.phpt?r1=1.1.8.1&r2=1.1.8.2&diff_format=u Index: php-src/ext/mysql/tests/003.phpt diff -u php-src/ext/mysql/tests/003.phpt:1.1.8.1 php-src/ext/mysql/tests/003.phpt:1.1.8.2 --- php-src/ext/mysql/tests/003.phpt:1.1.8.1 Wed Oct 10 09:47:21 2007 +++ php-src/ext/mysql/tests/003.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_fetch_object --SKIPIF-- -<?php include 'skipif.inc'; ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include_once('connect.inc'); http://cvs.php.net/viewvc.cgi/php-src/ext/mysql/tests/002.phpt?r1=1.1.8.1&r2=1.1.8.2&diff_format=u Index: php-src/ext/mysql/tests/002.phpt diff -u php-src/ext/mysql/tests/002.phpt:1.1.8.1 php-src/ext/mysql/tests/002.phpt:1.1.8.2 --- php-src/ext/mysql/tests/002.phpt:1.1.8.1 Wed Oct 10 09:47:21 2007 +++ php-src/ext/mysql/tests/002.phpt Fri Oct 12 11:57:18 2007 @@ -1,7 +1,10 @@ --TEST-- mysql_fetch_array --SKIPIF-- -<?php include 'skipif.inc'; ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php require_once('connect.inc');
« previous php.cvs (#46656) next »