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