• Home
  • Raw
  • Download

Lines Matching +full:run +full:- +full:shellcheck

6 # Copyright 2008-2020 Kate Ward. All Rights Reserved.
17 # Run all tests for all shells.
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
29 ### ShellCheck (http://www.shellcheck.net/)
31 # shellcheck disable=SC1090,SC1091
33 # shellcheck disable=SC2003
35 # shellcheck disable=SC2006
38 [ -z "${RUNNER_LOADED:-}" ] || return 0
52 echo "usage: ${RUNNER_ARGV0} [-e key=val ...] [-s shell(s)] [-t test(s)]"
57 # shellcheck disable=SC1117
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.'
86 # shellcheck disable=SC2166
87 if [ -z "${key}" -o -z "${val}" ]; then
96 s) shells=${OPTARG} ;; # list of shells to run
97 t) tests=${OPTARG} ;; # list of tests to run
101 shift "`expr ${OPTIND} - 1`"
104 shells=${shells:-${RUNNER_SHELLS}}
105 [ -z "${tests}" ] && tests=`_runner_tests`
108 if [ -z "${tests}" ]; then
109 runner_error 'no tests found to run; exiting'
114 #------------------------------------------------------------------------------
118 $ uname -mprsv
119 `uname -mprsv`
124 ### Test run info.
132 # Run tests.
139 #------------------------------------------------------------------------------
150 shell_bin=`command -v busybox`
151 [ $? -eq "${RUNNER_TRUE}" ] && shell_present="${RUNNER_TRUE}"
156 [ -x "${shell_bin}" ] && shell_present="${RUNNER_TRUE}"
160 if [ "${shell_present}" -eq "${RUNNER_FALSE}" ]; then
161 runner_warn "unable to run tests with the ${shell_name} shell"
173 echo "--- Executing the '`_runner_testName "${t}"`' test suite. ---"
175 # shellcheck disable=SC2086
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