diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2017-05-19 23:03:14 +0200 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2017-05-19 23:03:14 +0200 |
commit | cf55355440153f59504697ea0f5d5eb61d9f7453 (patch) | |
tree | a20e68ae166b4ad5a8dee202c9ba6c4f68b62b6f | |
parent | 6945be500ea78761681d856f96f36347dae17886 (diff) | |
download | isc-dhcp-cf55355440153f59504697ea0f5d5eb61d9f7453.tar.gz |
[19430] Minor unit-test tweaks.
-rw-r--r-- | tests/shell/dhclient_tests.sh | 2 | ||||
-rw-r--r-- | tests/shell/dhcp_test_lib.sh | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/shell/dhclient_tests.sh b/tests/shell/dhclient_tests.sh index ae0d1def..d54e73a7 100644 --- a/tests/shell/dhclient_tests.sh +++ b/tests/shell/dhclient_tests.sh @@ -27,6 +27,8 @@ IFACE=lo bin="dhclient" bin_path=/home/thomson/devel/dhcp-git/client +PROCS="dhcpd dhclient" + # Import common test library. . /home/thomson/devel/dhcp-git/tests/shell/dhcp_test_lib.sh diff --git a/tests/shell/dhcp_test_lib.sh b/tests/shell/dhcp_test_lib.sh index fc60561f..db74d55b 100644 --- a/tests/shell/dhcp_test_lib.sh +++ b/tests/shell/dhcp_test_lib.sh @@ -5,7 +5,6 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. # A list of processes, mainly used by the cleanup functions. -PROCS="dhcpd dhclient" # colors if not outputting to a dumb terminal and stdout is a tty if test "$TERM" != dumb && { test -t 1; } 2>/dev/null; then \ @@ -271,8 +270,8 @@ grep_file() { clean_exit 1 fi - _GREP_FILE_COUNT=$( grep -o ${expr} ${file} | wc -l ) - printf "File %s contains %d instances of \"%s\"\n" "${file}" "${_GREP_FILE_COUNT}" "${expr}" + _GREP_FILE_COUNT=$( grep -o "${expr}" ${file} | wc -l ) + printf "File %s contains %d instance(s) of \"%s\"\n" "${file}" "${_GREP_FILE_COUNT}" "${expr}" if [ ${_GREP_FILE_COUNT} != ${expected} ]; then printf "ERROR: File %s expected to contain %d instances of '%s', but contains %d\n" \ |