Fix "make distcheck"
This commit is contained in:
parent
b651398e0b
commit
41a7df17a0
|
@ -18,4 +18,4 @@ sources=vfs.c
|
||||||
[tests.log]
|
[tests.log]
|
||||||
type=script
|
type=script
|
||||||
script=./tests.sh
|
script=./tests.sh
|
||||||
depends=plugins,vfs,tests.sh
|
depends=$(OBJDIR)plugins$(EXEEXT),$(OBJDIR)vfs$(EXEEXT),tests.sh
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
#variables
|
#variables
|
||||||
|
[ -n "$OBJDIR" ] || OBJDIR="./"
|
||||||
PROGNAME="tests.sh"
|
PROGNAME="tests.sh"
|
||||||
#executables
|
#executables
|
||||||
DATE="date"
|
DATE="date"
|
||||||
|
@ -25,20 +26,28 @@ DATE="date"
|
||||||
#functions
|
#functions
|
||||||
#fail
|
#fail
|
||||||
_fail()
|
_fail()
|
||||||
|
{
|
||||||
|
_run "$@"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#run
|
||||||
|
_run()
|
||||||
{
|
{
|
||||||
test="$1"
|
test="$1"
|
||||||
|
|
||||||
shift
|
shift
|
||||||
echo -n "$test:" 1>&2
|
echo -n "$test:" 1>&2
|
||||||
(echo
|
(echo
|
||||||
echo "Testing: ./$test" "$@"
|
echo "Testing: $OBJDIR$test" "$@"
|
||||||
LD_LIBRARY_PATH="${OBJDIR}../src" "./$test" "$@") >> "$target" 2>&1
|
LD_LIBRARY_PATH="$OBJDIR../src" "$OBJDIR$test" "$@") >> "$target" 2>&1
|
||||||
res=$?
|
res=$?
|
||||||
if [ $res -ne 0 ]; then
|
if [ $res -ne 0 ]; then
|
||||||
echo " FAIL (error $res)" 1>&2
|
echo " FAIL (error $res)"
|
||||||
else
|
else
|
||||||
echo " PASS" 1>&2
|
echo " PASS"
|
||||||
fi
|
fi
|
||||||
|
return $res
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,20 +56,9 @@ _test()
|
||||||
{
|
{
|
||||||
test="$1"
|
test="$1"
|
||||||
|
|
||||||
shift
|
_run "$@"
|
||||||
echo -n "$test:" 1>&2
|
|
||||||
(echo
|
|
||||||
echo "Testing: ./$test" "$@"
|
|
||||||
LD_LIBRARY_PATH="${OBJDIR}../src" "./$test" "$@") >> "$target" 2>&1
|
|
||||||
res=$?
|
res=$?
|
||||||
if [ $res -ne 0 ]; then
|
[ $res -eq 0 ] || FAILED="$FAILED $test(error $res)"
|
||||||
echo " FAIL" 1>&2
|
|
||||||
FAILED="$FAILED $test(error $res)"
|
|
||||||
return 2
|
|
||||||
else
|
|
||||||
echo " PASS" 1>&2
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user