cvs: pear /DB package.xml /DB/doc TESTERS /DB/tests include.inc /DB/tests/driver setup.inc.cvs
| From: | Daniel Convissor | Date: | Fri, 30 Apr 2004 02:45:16 +0000 |
| Subject: | cvs: pear /DB package.xml /DB/doc TESTERS /DB/tests include.inc /DB/tests/driver setup.inc.cvs | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-19011@lists.php.net to get a copy of this message | ||
danielc Thu Apr 29 22:45:16 2004 EDT
Modified files:
/pear/DB package.xml
/pear/DB/doc TESTERS
/pear/DB/tests include.inc
/pear/DB/tests/driver setup.inc.cvs
Log:
Make the test suite work for installed packages.
http://cvs.php.net/diff.php/pear/DB/package.xml?r1=1.100&r2=1.101&ty=u
Index: pear/DB/package.xml
diff -u pear/DB/package.xml:1.100 pear/DB/package.xml:1.101
--- pear/DB/package.xml:1.100 Thu Apr 29 19:45:04 2004
+++ pear/DB/package.xml Thu Apr 29 22:45:15 2004
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<package version="1.0">
- <!-- $Id: package.xml,v 1.100 2004/04/29 23:45:04 danielc Exp $ -->
+ <!-- $Id: package.xml,v 1.101 2004/04/30 02:45:15 danielc Exp $ -->
<name>DB</name>
<summary>Database Abstraction Layer</summary>
<description>
@@ -88,6 +88,10 @@
IT NOW WORKS! (danielc)
- tests:
+Make test suite work for installed packages.
+Already worked for CVS checkouts. (danielc)
+
+- tests:
Made adjustments so mysql and mysqli pass
transactions and foreign key tests.
(danielc)
@@ -126,7 +130,10 @@
<file name="errors.inc"/>
<file name="fetchmode_object.inc"/>
<file name="fetchmodes.inc"/>
- <file name="include.inc"/>
+ <file name="include.inc">
+ <replace from="@include_path@" to="php_dir"
+ type="pear-config"/>
+ </file>
<file name="limit.inc"/>
<file name="numcols.inc"/>
<file name="numrows.inc"/>
@@ -157,7 +164,10 @@
<file name="connect.inc"/>
<file name="mktable.inc"/>
<file name="run.cvs"/>
- <file name="setup.inc.cvs"/>
+ <file name="setup.inc.cvs">
+ <replace from="@include_path@" to="php_dir"
+ type="pear-config"/>
+ </file>
<file name="skipif.inc"/>
</dir>
</dir>
http://cvs.php.net/diff.php/pear/DB/doc/TESTERS?r1=1.18&r2=1.19&ty=u
Index: pear/DB/doc/TESTERS
diff -u pear/DB/doc/TESTERS:1.18 pear/DB/doc/TESTERS:1.19
--- pear/DB/doc/TESTERS:1.18 Thu Apr 29 19:22:12 2004
+++ pear/DB/doc/TESTERS Thu Apr 29 22:45:16 2004
@@ -2,7 +2,7 @@
HOW TO TEST PEAR DB
===================
-$Id: TESTERS,v 1.18 2004/04/29 23:22:12 danielc Exp $
+$Id: TESTERS,v 1.19 2004/04/30 02:45:16 danielc Exp $
INTRODUCTION
@@ -37,16 +37,39 @@
Obtain DB and its Test Framework
--------------------------------
-Create a location to store the test installation of DB and its test
-scripts.
+* IF PEAR DB IS ALREADY INSTALLED:
- mkdir d:/peartest
- cd d:/peartest
- cvs -d :pserver:cvsread@cvs.php.net:/repository co -P pear/DB
-
-We assume you already have the PEAR base package installed. If you
-don't, you will need to do so, but the instructions for doing that
-are beyond the scope of this document.
+ If you have PEAR DB installed already, good. The test suite
+ is in place. Open up a command/shell prompt and move into
+ the test directory.
+
+ cd <path to pear insall>/tests/DB/tests
+
+* VIA A NEW INSTALLATION USING THE PEAR INSTALLER:
+
+ Installing PEAR has gotten fairly easy. Follow the instructions
+ from the manual: http://pear.php.net/manual/en/installation.php
+ Once PEAR and DB are installed, move to the test directory.
+
+ cd pear/tests/DB/tests
+
+* VIA CVS:
+
+ Create a location to store the test installation of DB and its
+ test scripts.
+
+ mkdir d:/peartest
+ cd d:/peartest
+ cvs -d :pserver:cvsread@cvs.php.net:/repository co -P pear/DB
+
+ We assume you already have the PEAR base package installed. If
+ you don't, you will need to do so, but the instructions for
+ doing that are beyond the scope of this document. See
+ http://pear.php.net/manual/en/installation.php
for more info.
+
+ Move to the test directory.
+
+ cd pear/DB/tests
Copy the Starter Shell Script and Edit the Paths
@@ -57,7 +80,6 @@
the paths and file names in them need to be set to those used by
your system.
- cd pear/DB/tests
cp run.cvs run
chmod 755 run
vi run
@@ -125,7 +147,7 @@
Chuck Hagenbuch - - - - - X - - - - - - -
Ludovico Magnocavallo - - X - - - - - - - - - -
Daniel Convissor - - X - - X X X X X² X X X
-
+
MISSING TESTERS - X - - X - - - - - - - -
Comments:
http://cvs.php.net/diff.php/pear/DB/tests/include.inc?r1=1.3&r2=1.4&ty=u
Index: pear/DB/tests/include.inc
diff -u pear/DB/tests/include.inc:1.3 pear/DB/tests/include.inc:1.4
--- pear/DB/tests/include.inc:1.3 Mon Feb 2 11:39:15 2004
+++ pear/DB/tests/include.inc Thu Apr 29 22:45:16 2004
@@ -9,8 +9,29 @@
define('PATH_SEPARATOR', ':');
}
}
-ini_set('include_path', realpath(dirname(__FILE__) . '/..')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path'));
+
+/*
+ * If the path to your PEAR installation is found in the left hand
+ * portion of the if() expression below, that means this file has
+ * come from the PEAR installer. Therefore, let's use the
+ * installed version of DB, which should be found via the
+ * computer's default include_path. Add '.' to the include_path
+ * to ensure '.' is in there.
+ *
+ * If the path has not been substituted in the if() expression,
+ * this file has likely come from a CVS checkout or a .tar file.
+ * Therefore, we'll assume the tests should use the version of
+ * DB that has come from there as well.
+ */
+if ('@include_path@' != '@'.'include_path'.'@') {
+ ini_set('include_path', ini_get('include_path')
+ . PATH_SEPARATOR . '.'
+ );
+} else {
+ ini_set('include_path', realpath(dirname(__FILE__) . '/..')
+ . PATH_SEPARATOR . '.' . PATH_SEPARATOR
+ . ini_get('include_path')
+ );
+}
?>
http://cvs.php.net/diff.php/pear/DB/tests/driver/setup.inc.cvs?r1=1.2&r2=1.3&ty=u
Index: pear/DB/tests/driver/setup.inc.cvs
diff -u pear/DB/tests/driver/setup.inc.cvs:1.2 pear/DB/tests/driver/setup.inc.cvs:1.3
--- pear/DB/tests/driver/setup.inc.cvs:1.2 Thu Apr 29 20:02:12 2004
+++ pear/DB/tests/driver/setup.inc.cvs Thu Apr 29 22:45:16 2004
@@ -19,10 +19,29 @@
}
}
-ini_set('include_path', realpath(dirname(__FILE__) . '/../..')
- . PATH_SEPARATOR . '.' . PATH_SEPARATOR
- . ini_get('include_path')
-);
+/*
+ * If the path to your PEAR installation is found in the left hand
+ * portion of the if() expression below, that means this file has
+ * come from the PEAR installer. Therefore, let's use the
+ * installed version of DB, which should be found via the
+ * computer's default include_path. Add '.' to the include_path
+ * to ensure '.' is in there.
+ *
+ * If the path has not been substituted in the if() expression,
+ * this file has likely come from a CVS checkout or a .tar file.
+ * Therefore, we'll assume the tests should use the version of
+ * DB that has come from there as well.
+ */
+if ('@include_path@' != '@'.'include_path'.'@') {
+ ini_set('include_path', ini_get('include_path')
+ . PATH_SEPARATOR . '.'
+ );
+} else {
+ ini_set('include_path', realpath(dirname(__FILE__) . '/../..')
+ . PATH_SEPARATOR . '.' . PATH_SEPARATOR
+ . ini_get('include_path')
+ );
+}
require_once 'DB.php';