diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2000-12-03 10:45:57 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2000-12-03 10:45:57 +0000 |
commit | 46cdd040e2d4043e7b52b63f8153c27e9ef42095 (patch) | |
tree | 87e39bd50cce73726ea6099d6f20405058bb5bf8 | |
parent | 6f164ad7dc44fa049e8eea8ee4a37913e0db1dda (diff) | |
download | php-git-46cdd040e2d4043e7b52b63f8153c27e9ef42095.tar.gz |
changed run-tests.php to use 'php -q' instead of 'php -f'
-rw-r--r-- | build/rules.mk | 2 | ||||
-rwxr-xr-x | run-tests.php | 8 | ||||
-rwxr-xr-x | tests/README | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/build/rules.mk b/build/rules.mk index 4699e32a50..8459f6c0e6 100644 --- a/build/rules.mk +++ b/build/rules.mk @@ -54,7 +54,7 @@ distclean: distclean-recursive clean-x php_config.h stamp-h Makefile build-defs.h php4.spec libphp4.module test: $(top_builddir)/php - @$(top_builddir)/php -f $(top_srcdir)/run-tests.php `pwd` + @$(top_builddir)/php -q $(top_srcdir)/run-tests.php `pwd` include $(builddir)/.deps diff --git a/run-tests.php b/run-tests.php index 3f90d4251b..00d252ff60 100755 --- a/run-tests.php +++ b/run-tests.php @@ -124,11 +124,11 @@ function do_testing($argc, &$argv) { global $term, $windows_p, $php, $skip, $testdirs, $tmpfile, $opts, $skipped, $failed, $passed, $total, $term_bold, $term_norm; - if ($argc > 0) { - if (is_dir($argv[0])) { - $dir = $argv[0]; + if ($argc > 1) { + if (is_dir($argv[1])) { + $dir = $argv[1]; } else { - for ($i = 0; $i < $argc; $i++) { + for ($i = 1; $i < $argc; $i++) { switch (run_test($argv[$i])) { case TEST_SKIPPED: case TEST_INTERNAL_ERROR: diff --git a/tests/README b/tests/README index b9b0622ecf..3c739c2fa9 100755 --- a/tests/README +++ b/tests/README @@ -2,17 +2,17 @@ PHP Regression Tests ==================== To run the tests, go to the top-level directory and -run "./php -f run-tests.php". +run "./php -q run-tests.php". Without parameters, "run-tests.php" will recursively scan through the file tree looking for directories called "tests", and run all the tests (.phpt files) within (recursively). To run tests in a single directory, pass the directory as a parameter: -"./php -f run-tests.php tests/lang". +"./php -q run-tests.php tests/lang". To run one or more single tests, pass them as parameters: -"./php -f run-tests.php tests/lang/015.phpt". +"./php -q run-tests.php tests/lang/015.phpt". The format of the .phpt files is quite simple. There are 6 possible sections. Test, Skipif, Post, Get, File and Expect. The Test section |