diff options
author | valmat <ufabiz@gmail.com> | 2014-03-27 01:56:33 +0600 |
---|---|---|
committer | valmat <ufabiz@gmail.com> | 2014-03-27 01:56:33 +0600 |
commit | 421da59495602ba5ac4aa6a2a10ac735b110c1a9 (patch) | |
tree | f39f63254789d047858e626556d0ee032fd1a9c3 /tests/test.sh | |
parent | d0d062b4a05a9eb64b8d2e6d038af96ac532e4b3 (diff) |
in test.sh added option -t
in the script tests/test.sh added option -t (the full list of options, see ./test.sh -h) - allows you to run individual tests
For example:
`./test.sh -t "php/phpt/variables/010-value-object2.phpt php/phpt/base/001.phpt"`
`./test.sh -nt php/phpt/variables/010-value-object2.phpt`
Diffstat (limited to 'tests/test.sh')
-rwxr-xr-x | tests/test.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/test.sh b/tests/test.sh index 58f65ad..a77d670 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -22,6 +22,7 @@ function print_help() { echo " (possible values: PASS, FAIL, XFAIL, SKIP, BORK, WARN, LEAK, REDIRECT)." echo " -m Test for memory leaks with Valgrind." echo " -r Removes all auxiliary files. (*.log, *.diff etc)." + echo " -t <files> Test file(s). Specify individual file(s) to test" echo " -s <file> Write output to <file>." echo " -x Sets 'SKIP_SLOW_TESTS' environmental variable." echo " -o Cancels sets 'SKIP_ONLINE_TESTS' (default set)." @@ -39,8 +40,10 @@ COMPILE_EXT=1 # SKIP_ONLINE_TESTS == true OFFLINE=1 EXT_NAME="extfortest.so" +# The file list of the tests that will be launched +TEST_FILES="" -while getopts ":p:e:nw:a:d:g:mrs:xoqvh" opt ; +while getopts ":p:e:nw:a:d:g:mrt:s:xoqvh" opt ; do case $opt in p) @@ -88,6 +91,9 @@ do fi exit; ;; + t) + TEST_FILES="$OPTARG" + ;; x) SCR_OPT="$SCR_OPT -x" ;; @@ -112,6 +118,11 @@ do esac done +# The file list of the tests that will be launched +if [ ! "$TEST_FILES" ]; then + TEST_FILES=`find ./php/phpt -type f -name "*.phpt"` +fi + # default offline mode if [ 1 = $OFFLINE ]; then SCR_OPT="$SCR_OPT --offline" @@ -119,8 +130,6 @@ fi # A list of all additional options SCR_OPT="$SCR_OPT -d extension_dir=$PWD/ext_dir -d extension=$EXT_NAME" -# The file list of the tests that will be launched -TEST_FILES=`find ./php/phpt -type f -name "*.phpt"` # Create a local copy of the directory with the extension for run without installation |