Commit cd0b49c7 authored by Sean Finney's avatar Sean Finney

Imported Upstream version 5.2.9.dfsg.1

parent 9ea47aab

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>php-5.2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
......@@ -11,7 +11,7 @@ all: $(all_targets)
@echo "Don't forget to run 'make test'."
@echo
build-modules: $(PHP_MODULES)
build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
......@@ -73,6 +73,11 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
for i in $(PHP_MODULES)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d extension=$$dlname"; \
done; \
fi; \
if test "x$(PHP_ZEND_EX)" != "x"; then \
for i in $(PHP_ZEND_EX)""; do \
. $$i; $(top_srcdir)/build/shtool echo -n -- " -d $(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
done; \
fi`
test: all
......@@ -80,50 +85,23 @@ test: all
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -U -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -U -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
utest: all
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -u -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
ntest: all
-@if test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo php_ini_loaded_file();'`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
INI_SCANNED_PATH=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -N -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
$(top_builddir)/$(SAPI_CLI_PATH) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
......
This diff is collapsed.
[IMPORTANT NOTICE]
------------------
This is an addendum to README.TESTING with additional information
specific to run-tests2.php.
specific to server-tests.php.
run-tests2.php is backward compatible with tests developed for
the original run-tests.php script. run-tests2 is *not* used by
'make test'. run-tests2 was developed to provide support for
server-tests.php is backward compatible with tests developed for
the original run-tests.php script. server-tests is *not* used by
'make test'. server-tests was developed to provide support for
testing PHP under it's primary environment, HTTP, and can run the
PHP tests under any of the SAPI modules that are direct executables,
or are accessable via HTTP.
......@@ -13,12 +13,12 @@ or are accessable via HTTP.
[New features]
----------------
* Command line interface:
You can run 'php run-tests2.php -h' to get all the possible options.
You can run 'php server-tests.php -h' to get all the possible options.
* Configuration file:
the -c argument will allow you to use a configuration file. This is
handy if you are testing multiple environments and need various options
depending on the environment.
see run-tests-config.php for details.
see server-tests-config.php for details.
* CGI Emulation:
Will emulate a CGI environment when testing with the cgi sapi executable.
* HTTP testing:
......@@ -39,23 +39,23 @@ make testing work.
Some (but not all!) examples of usage:
1. run tests from the php source directory
php run-tests2.php -p /path/to/php-cli
php server-tests.php -p /path/to/php-cli
2. run tests using cgi emulation
php run-tests2.php -p /path/to/php-cgi
php server-tests.php -p /path/to/php-cgi
3. run tests over http, copying test files into document root
php run-tests2.php -w -u http://localhost/test -m /path/to/htdocs/test
php server-tests.php -w -u http://localhost/test -m /path/to/htdocs/test
4. run tests over http, php sources have been aliased in web server
php run-tests2.php -w -u http://localhost/test
php server-tests.php -w -u http://localhost/test
5. run tests using configuration file
php run-tests2.php -c /path/to/run-tests-config.php
php server-tests.php -c /path/to/server-tests-config.php
6. run tests using configuration file, but overriding some settings:
(config file must be first)
php run-tests2.php -c /path/to/run-tests-config.php -w -t 3 -d /path/to/testdir
php server-tests.php -c /path/to/server-tests-config.php -w -t 3 -d /path/to/testdir
NOTE: configuration as described in README.TESTING still works.
......@@ -63,7 +63,7 @@ NOTE: configuration as described in README.TESTING still works.
----------------
In addition to the traditional test sections
(see http://qa.php.net/write-test.php), several new sections are available
under run-tests2.
under server-tests.
--POST--
This is not a new section, but not multipart posts are supported for testing
......@@ -97,7 +97,7 @@ include:
$scriptname this is what will become SCRIPT_NAME unless you override it
$docroot the equivelant of DOCUMENT_ROOT under Apache
$cwd the directory that the test is being initiated from
$this->conf all run-tests2 configuration vars
$this->conf all server-tests configuration vars
$this->env all environment variables that will get passed to the test
......
......@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
......
......@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| Thread Safe Resource Manager |
+----------------------------------------------------------------------+
| Copyright (c) 1999-2008, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| Copyright (c) 1999-2009, Andi Gutmans, Sascha Schumann, Zeev Suraski |
| This source file is subject to the TSRM license, that is bundled |
| with this package in the file LICENSE |
+----------------------------------------------------------------------+
......
......@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2009 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
......@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
/* $Id: tsrm_nw.c,v 1.8.2.1.2.2 2007/12/31 07:20:02 sebastian Exp $ */
/* $Id: tsrm_nw.c,v 1.8.2.1.2.3 2008/12/31 11:17:31 sebastian Exp $ */
#include <stdlib.h>
#include <stdio.h>
......
......@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2009 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
......
......@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2008 The PHP Group |
| Copyright (c) 1997-2009 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
......@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.38 2007/12/31 07:20:02 sebastian Exp $ */
/* $Id: tsrm_virtual_cwd.c,v 1.74.2.9.2.41 2008/12/31 11:17:31 sebastian Exp $ */
#include <sys/types.h>
#include <sys/stat.h>
......@@ -491,6 +491,7 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func
int use_relative_path = 0;
#ifdef TSRM_WIN32
int is_unc;
int exists;
#endif
TSRMLS_FETCH();
......@@ -589,6 +590,7 @@ no_realpath:
CWD_STATE_COPY(&old_state, state);
#ifdef TSRM_WIN32
exists = (use_realpath != CWD_EXPAND);
ret = 0;
is_unc = 0;
if (path_length >= 2 && path[1] == ':') {
......@@ -696,13 +698,16 @@ no_realpath:
ptr_length = length;
FindClose(hFind);
ret = 0;
} else if (use_realpath == CWD_REALPATH) {
} else {
if (is_unc) {
/* skip share name */
is_unc--;
ret = 0;
} else {
ret = 1;
exists = 0;
if (use_realpath == CWD_REALPATH) {
ret = 1;
}
}
}
}
......@@ -742,7 +747,7 @@ no_realpath:
/* Store existent file in realpath cache. */
#ifdef TSRM_WIN32
if (use_cache && !is_unc) {
if (use_cache && !is_unc && exists) {
#else
if (use_cache && (use_realpath == CWD_REALPATH)) {
#endif
......