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

*** empty log message ***

Rev: src/sftp/testsuite/common.sh:1.1
Rev: src/sftp/testsuite/connect-test:1.1
Rev: src/sftp/testsuite/run-tests:1.1
Rev: src/sftp/testsuite/setup-env:1.1
Rev: src/sftp/testsuite/teardown-env:1.1
parent eae67b2f
# Common stuff for all test scripts.
set -e
TESTHOME=home
function client () {
cd $TESTHOME ../../sftp-test-client ../../sftp-server "$@"
}
#! /bin/sh
. common.sh
client
#! /bin/sh
failed=0
all=0
function env_program () {
if [ -x ./"$1" ] ; then
if ./"$1" then : ; else
echo FAIL: $1
exit 1
fi
fi
function test_program () {
if $1 ; then
echo PASS: ${$1%-test}
else
echo FAIL: ${$1%-test}
failed=`expr $failed + 1`
fi
all=`expr $all + 1`
}
env_program setup-env
if [ $# -eq 0 ] ; then
for f in *-test; do test_program $1; done
else
for f in "$@" ; then do test_program $1; done
fi
if [ $failed -eq 0 ] ; then
banner="All $all tests passed"
else
banner="$failed of $all tests failed"
fi
dashes=`echo "$banner" | sed s/./=/g`
echo "$dashes"
echo "$banner"
echo "$dashes"
env_program teardown-env
[ "$failed" -eq 0 ]
#! /bin/sh
. common.sh
# Create a directory to play with
mkdir $TESTHOME
cd $TESTHOME
# Create some files
echo foo >x1
echo bar >x2
mkdir d
echo gazonk >d/x3
#! /bin/sh
. common.sh
rm -rf $TEMPHOME
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