Commit c780083c authored by Niels Möller's avatar Niels Möller
Browse files

* src/sftp/testsuite/run-tests: Use srcdir when starting scripts.

Rev: src/sftp/testsuite/Makefile.am:1.4
Rev: src/sftp/testsuite/run-tests:1.4
parent 32641cda
TS_SH = connect-test get-1-test ls-1-test ls-2-test put-1-test
EXTRA_DIST = common.sh run-tests \
setup-env teardown-env \
connect-test get-1-test ls-1-test ls-2-test put-1-test
$(TS_SH)
check:
(cd $(srcdir) && ./run-tests)
$(srcdir)/run-tests $(TS_SH)
......@@ -3,9 +3,13 @@
failed=0
all=0
if [ -z "$srcdir" ] ; then
srcdir=.
fi
env_program () {
if [ -x ./"$1" ] ; then
if ./"$1"; then : ; else
if [ -x "$srcdir/$1" ] ; then
if "$srcdir/$1"; then : ; else
echo FAIL: $1
exit 1
fi
......@@ -13,7 +17,7 @@ env_program () {
}
test_program () {
if "./$1" ; then
if "$srcdir/$1" ; then
echo PASS: ${1%-test}
else
echo FAIL: ${1%-test}
......@@ -25,7 +29,7 @@ test_program () {
env_program setup-env
if [ $# -eq 0 ] ; then
for f in *-test; do test_program "$f"; done
for f in `cd $srcdir && echo *-test`; do test_program "$f"; done
else
for f in "$@" ; do test_program "$f"; done
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment