summaryrefslogtreecommitdiffstats
path: root/test/util/vercmptest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/util/vercmptest.sh')
-rwxr-xr-xtest/util/vercmptest.sh16
1 files changed, 7 insertions, 9 deletions
diff --git a/test/util/vercmptest.sh b/test/util/vercmptest.sh
index 9297cdcb..a7fd8517 100755
--- a/test/util/vercmptest.sh
+++ b/test/util/vercmptest.sh
@@ -18,12 +18,18 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# default binary if one was not specified as $1
-bin='vercmp'
+bin=${1:-${PMTEST_UTIL_DIR}vercmp}
# holds counts of tests
total=92
run=0
failure=0
+# use first arg as our binary if specified
+if ! type -p "$bin"; then
+ echo "Bail out! vercmp binary ($bin) could not be located"
+ exit 1
+fi
+
# args:
# pass ver1 ver2 ret expected
pass() {
@@ -57,14 +63,6 @@ runtest() {
$func $2 $1 $ret $reverse
}
-# use first arg as our binary if specified
-[[ -n "$1" ]] && bin="$1"
-
-if ! type -p "$bin"; then
- echo "Bail out! vercmp binary ($bin) could not be located"
- exit 1
-fi
-
echo "# Running vercmp tests..."
echo "1..$total"