diff --git a/tests/test_versions/test.sh b/tests/test_versions/test.sh index e3b6a48612c4f876c29cf87860d811d688d5d385..a168aa1f12b03dd9f01e66eddb01301238bbdfc0 100755 --- a/tests/test_versions/test.sh +++ b/tests/test_versions/test.sh @@ -7,14 +7,12 @@ EPICS_BASE=${EPICS_BASE:-/epics/base-7.0.5} REQUIRE_VER=${E3_REQUIRE_VERSION:-3.4.1} if which ack &>/dev/null; then - __use_ack=true + __SEARCH_COMMAND__="ack --passthru" else echo "ack is not installed; defaulting to grep, but note that the log will be missing the IOC log" >&2 - __use_ack=false + __SEARCH_COMMAND__="grep -E" fi -#__use_ack=false - function usage { echo "Usage:" echo " bash test.sh [-b <EPICS_BASE>] [-r <REQUIRE_VER>] [-h] testfile" @@ -67,13 +65,8 @@ function test_require { echo "Installed: ${args[*]}" echo "============================================================" - if [ "$__use_ack" = true ]; then - required=${required//+/\\+} - expected=${expected//+/\\+} - __SEARCH_COMMAND__="ack --passthru" - else - __SEARCH_COMMAND__="grep" - fi + required=${required//+/\\+} + expected=${expected//+/\\+} clean_vers @@ -91,8 +84,6 @@ function test_require { search_string="^Loaded $MODULENAME version $expected\$" fi - echo "SEARCH STRING: $search_string" - # The funny sed command here is from https://unix.stackexchange.com/a/235016/445931 # The reason this is needed is because the "Starting iocInit" message seems to be threaded # differently than the regular flow of output and sometimes will separate the strings that