From: Victor Westerhuis <victor@westerhu.is>
Date: Wed, 8 Feb 2023 23:04:27 +0100
Subject: Make executable location explicit in test script

This change allows using the test script in autopkgtest.

Forwarded: no
---
 testing/run_test.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/testing/run_test.sh b/testing/run_test.sh
index 056d873..8dd3dc8 100755
--- a/testing/run_test.sh
+++ b/testing/run_test.sh
@@ -7,10 +7,10 @@ then
 	exit
 fi
 #
-PATH=`cd ..;pwd`:$PATH; export PATH
+: "${EXECUTABLE:=../add}"
 : "${PROGRAM:=add}"
 #
-CASE64=`file ../add 2>/dev/null | grep 64-bit`
+CASE64=`file "$EXECUTABLE" 2>/dev/null | grep 64-bit`
 #
 LINES=24;export LINES
 COLS=80;export COLS
@@ -51,7 +51,7 @@ do
 	echo ':w' >>"$TMP"
 	echo 'Q'  >>"$TMP"
 
-	add $OPT -o "$OUT" "$TMP" >"$NUL" 2>"$ERR"
+	"$EXECUTABLE" $OPT -o "$OUT" "$TMP" >"$NUL" 2>"$ERR"
 
 	if test -s "$ERR"; then
 		sed -e "s/: \<$PROGRAM\>/: add/" "$ERR" >"$TMP"
