@@ -31,27 +31,31 @@ export HOOK_VERBOSE_OPTION="-q"
3131# tox-created virtualenv.
3232export VIRTUALENVWRAPPER_PYTHON=" $envdir /bin/python"
3333
34- if [ -n " ${ZSH_VERSION:- } " ]
35- then
36- export SHELL=$( which zsh)
37- fi
38-
3934# Run the test scripts with a little formatting around them to make it
4035# easier to find where each script output starts.
41- for test_script in $scripts
36+ for test_shell in bash ksh zsh
4237do
43- echo
44- echo ' ********************************************************************************'
45- echo " Running $test_script "
46- echo " VIRTUAL_ENV=$VIRTUAL_ENV "
47- echo " VIRTUALENVWRAPPER_PYTHON=$VIRTUALENVWRAPPER_PYTHON "
48- echo " $( $VIRTUALENVWRAPPER_PYTHON -V 2>&1 ) "
49- echo " PYTHONPATH=$PYTHONPATH "
50- echo " SHELL=$SHELL "
51- echo
52- export SHUNIT_PARENT=" $test_script "
53- $test_script || exit 1
54- echo
38+ test_shell_opts=
39+ if [ $test_shell = " zsh" ]; then
40+ test_shell_opts=" -o shwordsplit"
41+ fi
42+ test_shell=$( which $test_shell )
43+
44+ for test_script in $scripts
45+ do
46+ echo
47+ echo ' ********************************************************************************'
48+ echo " Running $test_script "
49+ echo " VIRTUAL_ENV=$VIRTUAL_ENV "
50+ echo " VIRTUALENVWRAPPER_PYTHON=$VIRTUALENVWRAPPER_PYTHON "
51+ echo " $( $VIRTUALENVWRAPPER_PYTHON -V 2>&1 ) "
52+ echo " PYTHONPATH=$PYTHONPATH "
53+ echo " SHELL=$test_shell "
54+ echo
55+ export SHUNIT_PARENT=" $test_script "
56+ $test_shell $test_shell_opts $test_script || exit 1
57+ echo
58+ done
5559done
5660
5761exit 0
0 commit comments