Always test against the libraries compiled

This commit is contained in:
Pierre Pronchery 2015-06-13 11:39:16 -04:00
parent f37dde5fe5
commit accf8e02f0

View File

@ -34,15 +34,7 @@ _debug()
#fail #fail
_fail() _fail()
{ {
test="$1" _run "$@"
name="$2"
shift
shift
echo -n "$test:" 1>&2
(echo
echo "Testing: $test $name"
$DEBUG "./$test" "$@" 2>&1) >> "$target"
res=$? res=$?
if [ $res -ne 0 ]; then if [ $res -ne 0 ]; then
echo "./$test: $name: Failed with error code $res" >> "$target" echo "./$test: $name: Failed with error code $res" >> "$target"
@ -53,8 +45,8 @@ _fail()
} }
#test #run
_test() _run()
{ {
test="$1" test="$1"
name="$2" name="$2"
@ -64,7 +56,17 @@ _test()
echo -n "$test:" 1>&2 echo -n "$test:" 1>&2
(echo (echo
echo "Testing: $test $name" echo "Testing: $test $name"
$DEBUG "./$test" "$@" 2>&1) >> "$target" LD_LIBRARY_PATH="$OBJDIR../src" $DEBUG "./$test" "$@" 2>&1) >> "$target"
}
#test
_test()
{
test="$1"
name="$2"
_run "$@"
res=$? res=$?
if [ $res -ne 0 ]; then if [ $res -ne 0 ]; then
echo "./$test: $name: Failed with error code $res" >> "$target" echo "./$test: $name: Failed with error code $res" >> "$target"