Fix test cases which fail on Windows debug builds
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 11 Nov 2019 11:14:05 +0000 (12:14 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 11 Nov 2019 11:14:38 +0000 (12:14 +0100)
We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.

ext/mysqli/tests/mysqli_debug_append.phpt
ext/mysqli/tests/mysqli_store_result_buffered_c.phpt
ext/mysqli/tests/mysqli_store_result_copy.phpt

index 68e600772b62055cae098324b0d077205f276c4d..8c934eabacb611a114346c2b1b2741b2acb35083 100644 (file)
@@ -17,6 +17,8 @@ if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED)
 
 if (!$IS_MYSQLND)
        die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation");
+
+if (substr(PHP_OS, 0, 3) == 'WIN') die("skip this test is not for Windows platforms");
 ?>
 --FILE--
 <?php
index 58d588ac4935840348fa8c07dd602bd1580a76d1..cc776f01e2cfb9e2bfddfbe3dab74bc179508f4b 100644 (file)
@@ -7,7 +7,7 @@ require_once('skipifemb.inc');
 require_once('skipifconnectfailure.inc');
 ?>
 --INI--
-mysqlnd.debug=d:t:O,/tmp/mysqlnd.trace
+mysqlnd.debug=d:t:O,{TMP}/mysqlnd.trace
 --FILE--
 <?php
        require_once("connect.inc");
index 3f82b8a8925a281e8e903619449736b903de6f0e..dbe5d2f90501cf364d7afcbb12b532df47e35032 100644 (file)
@@ -10,7 +10,7 @@ if (!$IS_MYSQLND) {
 }
 ?>
 --INI--
-mysqlnd.debug=d:t:O,/tmp/mysqlnd.trace
+mysqlnd.debug=d:t:O,{TMP}/mysqlnd.trace
 mysqlnd.net_read_buffer_size=1
 mysqlnd.mempool_default_size=1
 mysqlnd.fetch_data_copy=0