summaryrefslogtreecommitdiff
path: root/tests/test_xauth
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2021-11-30 15:11:43 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2021-11-30 17:22:18 -0800
commit5598b8612b095d9f5f513ada2a4bbacaca1bfea8 (patch)
tree2e5deeba37adb017421b2088cca051afd9dc265e /tests/test_xauth
parent3d6519f11867183b9698cbf8cc9515bc767b98af (diff)
downloadxorg-app-xauth-5598b8612b095d9f5f513ada2a4bbacaca1bfea8.tar.gz
tests: make tests work in out-of-tree builds
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'tests/test_xauth')
-rwxr-xr-xtests/test_xauth11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_xauth b/tests/test_xauth
index 27d999b..e04d13c 100755
--- a/tests/test_xauth
+++ b/tests/test_xauth
@@ -6,22 +6,23 @@
# If no difference is found, the test is assumed as PASS (otherwise FAIL)
#
total_ret=0
-for script in `ls -1 ./*.script | sort` ; do
+testsrc="${srcdir:-.}"
+for script in `ls -1 ${testsrc}/*.script | sort` ; do
base=`basename $script .script`
echo "Testing $base"
$script > out.stdout 2> out.stderr
# check stdout for correctness
- if [ -f $base.stdout ]; then
- diff out.stdout $base.stdout
+ if [ -f ${testsrc}/$base.stdout ]; then
+ diff out.stdout ${testsrc}/$base.stdout
ret_stdout=$?
else
ret_stdout=0
fi
# check stderr for correctness
- if [ -f $base.stderr ]; then
- diff out.stderr $base.stderr
+ if [ -f ${testsrc}/$base.stderr ]; then
+ diff out.stderr ${testsrc}/$base.stderr
ret_stderr=$?
else
ret_stderr=0