Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test/util/pacsorttest.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/util/pacsorttest.sh')
-rwxr-xr-xtest/util/pacsorttest.sh15
1 files changed, 6 insertions, 9 deletions
diff --git a/test/util/pacsorttest.sh b/test/util/pacsorttest.sh
index 0abddc26..ac16c459 100755
--- a/test/util/pacsorttest.sh
+++ b/test/util/pacsorttest.sh
@@ -19,12 +19,17 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# default binary if one was not specified as $1
-bin='pacsort'
+bin=${1:-${PMTEST_UTIL_DIR}pacsort}
# holds counts of tests
total=23
run=0
failure=0
+if ! type -p "$bin"; then
+ echo "Bail out! pacsort binary ($bin) could not be located"
+ exit 1
+fi
+
# args:
# runtest input expected test_description optional_opts
runtest() {
@@ -42,14 +47,6 @@ runtest() {
fi
}
-# use first arg as our binary if specified
-[[ -n "$1" ]] && bin="$1"
-
-if ! type -p "$bin"; then
- echo "Bail out! pacsort binary ($bin) could not be located"
- exit 1
-fi
-
echo "Running pacsort tests..."
echo "1..$total"