Lines Matching +full:test +full:- +full:shell
4 # Unit test suite runner.
6 # Copyright 2008-2020 Kate Ward. All Rights Reserved.
20 # Run all tests for single shell.
21 # $ ./test_runner -s /bin/bash
23 # Run single test for all shells.
24 # $ ./test_runner -t shunit_asserts_test.sh
26 # Run single test for single shell.
27 # $ ./test_runner -s /bin/bash -t shunit_asserts_test.sh
38 [ -z "${RUNNER_LOADED:-}" ] || return 0
52 echo "usage: ${RUNNER_ARGV0} [-e key=val ...] [-s shell(s)] [-t test(s)]"
58 _runner_testName_=`expr "${1:-}" : "\(.*\)${RUNNER_TEST_SUFFIX}"`
59 if [ -n "${_runner_testName_}" ]; then
69 for _runner_dir_ in . ${LIB_DIR:-lib}; do
70 if [ -r "${_runner_dir_}/versions" ]; then
75 [ -n "${_runner_lib_dir_}" ] || runner_fatal 'Unable to find versions library.'
87 if [ -z "${key}" -o -z "${val}" ]; then
101 shift "`expr ${OPTIND} - 1`"
104 shells=${shells:-${RUNNER_SHELLS}}
105 [ -z "${tests}" ] && tests=`_runner_tests`
108 if [ -z "${tests}" ]; then
114 #------------------------------------------------------------------------------
118 $ uname -mprsv
119 `uname -mprsv`
124 ### Test run info.
134 for shell in ${shells}; do
139 #------------------------------------------------------------------------------
140 # Running the test suite with ${shell}.
144 # Check for existence of shell.
145 shell_bin=${shell}
148 case ${shell} in
150 shell_bin=`command -v busybox`
151 [ $? -eq "${RUNNER_TRUE}" ] && shell_present="${RUNNER_TRUE}"
153 shell_name=${shell}
156 [ -x "${shell_bin}" ] && shell_present="${RUNNER_TRUE}"
157 shell_name=`basename "${shell}"`
160 if [ "${shell_present}" -eq "${RUNNER_FALSE}" ]; then
161 runner_warn "unable to run tests with the ${shell_name} shell"
165 shell_version=`versions_shellVersion "${shell}"`
167 echo "shell name: ${shell_name}"
168 echo "shell version: ${shell_version}"
173 echo "--- Executing the '`_runner_testName "${t}"`' test suite. ---"
178 if [ "${shell_passing}" -ne "${RUNNER_TRUE}" ]; then
181 test "${runner_passing_}" -eq ${RUNNER_TRUE} -a ${shell_passing} -eq ${RUNNER_TRUE}
188 # Execute main() if this is run in standalone mode (i.e. not from a unit test).
189 if [ -z "${SHUNIT_VERSION}" ]; then