From 2d95e0ccf0e143602fc917948ee33466b1fe8b59 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Mon, 22 Nov 2021 11:22:04 +0100 Subject: [PATCH] test: fix search path for scripts Fails when building in a sub-directory Signed-off-by: Joachim Wiberg --- test/api.sh | 5 ++++- test/fwd.sh | 5 ++++- test/local.sh | 5 ++++- test/mark.sh | 5 ++++- test/remote.sh | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/test/api.sh b/test/api.sh index 81e0623..1a273c0 100755 --- a/test/api.sh +++ b/test/api.sh @@ -1,5 +1,8 @@ #!/bin/sh -. ./start.sh +if [ x"${srcdir}" = x ]; then + srcdir=. +fi +. ${srcdir}/start.sh export MSG="no-openlog-apitest" diff --git a/test/fwd.sh b/test/fwd.sh index 927c405..7b32184 100755 --- a/test/fwd.sh +++ b/test/fwd.sh @@ -1,6 +1,9 @@ #!/bin/sh # Test FWD between two syslogd, second binds 127.0.0.2:5555 -. ./start.sh +if [ x"${srcdir}" = x ]; then + srcdir=. +fi +. ${srcdir}/start.sh MSG="fwd and allow" diff --git a/test/local.sh b/test/local.sh index 721fb55..1797574 100755 --- a/test/local.sh +++ b/test/local.sh @@ -1,5 +1,8 @@ #!/bin/sh -. ./start.sh +if [ x"${srcdir}" = x ]; then + srcdir=. +fi +. ${srcdir}/start.sh MSG="foobar" MSG2="xyzzy" diff --git a/test/mark.sh b/test/mark.sh index 406cbe8..3067977 100755 --- a/test/mark.sh +++ b/test/mark.sh @@ -1,6 +1,9 @@ #!/bin/sh -e # Test '-- MARK --' in log, depends on fwd.sh -. ./start.sh +if [ x"${srcdir}" = x ]; then + srcdir=. +fi +. ${srcdir}/start.sh check_mark() { diff --git a/test/remote.sh b/test/remote.sh index 590f425..1cb9e3a 100755 --- a/test/remote.sh +++ b/test/remote.sh @@ -1,5 +1,8 @@ #!/bin/sh -. ./start.sh +if [ x"${srcdir}" = x ]; then + srcdir=. +fi +. ${srcdir}/start.sh MSG="kilroy"