| 1 |
lars |
1 |
#! /bin/sh
|
|
|
2 |
|
|
|
3 |
# $Id: run.cvs,v 1.3 2004/02/20 18:57:51 danielc Exp $
|
|
|
4 |
|
|
|
5 |
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
|
|
6 |
# PEAR DB TEST STARTER
|
|
|
7 |
#
|
|
|
8 |
# To run all tests: ./run
|
|
|
9 |
# To run one test: ./run <test file name>
|
|
|
10 |
# Example: ./run db_parsedsn.phpt
|
|
|
11 |
#
|
|
|
12 |
# Before running the tests you must adjust the
|
|
|
13 |
# following three variables:
|
|
|
14 |
|
|
|
15 |
# The full path to your PHP directory:
|
|
|
16 |
DB_TEST_PHP_PATH=c:/progra~1/php
|
|
|
17 |
|
|
|
18 |
# The name of your PHP CLI executable
|
|
|
19 |
# (examples php.exe, php-cli.exe, cli/php.exe):
|
|
|
20 |
DB_TEST_PHP_CLI=php.exe
|
|
|
21 |
|
|
|
22 |
# The full path to the present directory
|
|
|
23 |
# (not using $PWD due to Cygwin):
|
|
|
24 |
DB_TEST_DIR=d:/peartest/pear/DB/tests
|
|
|
25 |
|
|
|
26 |
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
TEST_PHP_EXECUTABLE=$DB_TEST_PHP_PATH/$DB_TEST_PHP_CLI
|
|
|
31 |
export TEST_PHP_EXECUTABLE
|
|
|
32 |
|
|
|
33 |
if [ $# -gt 0 ]
|
|
|
34 |
then
|
|
|
35 |
test=$1
|
|
|
36 |
else
|
|
|
37 |
test=*.phpt
|
|
|
38 |
fi
|
|
|
39 |
|
|
|
40 |
$TEST_PHP_EXECUTABLE $DB_TEST_PHP_PATH/run-tests.php $DB_TEST_DIR/${test}
|