diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-01-07 15:21:34 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-01-07 15:21:34 +0000 |
commit | b1fab873c2845e6b84919d6889ca3196cf56249a (patch) | |
tree | 78e60e43c631e87d8595ac54cff008f490a1ed4c /run-tests.php | |
parent | 7121150e5fbdb82eece631ff7b8f2704de7b94ad (diff) | |
download | php-git-b1fab873c2845e6b84919d6889ca3196cf56249a.tar.gz |
Added a check for availability of PCRE extension needed by test-suite.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/run-tests.php b/run-tests.php index 5be7943603..5756df2769 100755 --- a/run-tests.php +++ b/run-tests.php @@ -36,6 +36,27 @@ * - do not test PEAR components if base class and/or component class cannot be instanciated */ + +/* Sanity check to ensure that pcre extension needed by this script is avaliable. + * In the event it is not, print a nice error message indicating that this script will + * not run without it. + */ + +if (!extension_loaded("pcre")) { + echo <<< NO_PCRE_ERROR + ++-----------------------------------------------------------+ +| ! ERROR ! | +| The test-suite requires that you have pcre extension | +| enabled. To enable this extension either compile your PHP | +| with --with-pcre-regex or if you've compiled pcre as a | +| shared module load it via php.ini. | ++-----------------------------------------------------------+ + +NO_PCRE_ERROR; +exit; +} + // change into the PHP source directory. if (getenv('TEST_PHP_SRCDIR')) { |