#!/bin/sh
# ----------------------------------------------------------------------------
# - aleph-atest                                                              -
# - aleph interpreter test execution script                                  -
# ----------------------------------------------------------------------------
# - This program is  free software;  you can  redistribute it and/or  modify -
# - it provided that this copyright notice is kept intact.                   -
# -                                                                          -
# - This  program  is  distributed in the hope  that it  will be useful, but -
# - without  any   warranty;  without  even   the   implied    warranty   of -
# - merchantability  or fitness for a particular purpose. In not event shall -
# - the copyright holder be  liable for  any direct, indirect, incidental or -
# - special damages arising in any way out of the use of this software.      -
# ----------------------------------------------------------------------------
# - copyright (c) 1999-2003 amaury darsch                                    -
# ----------------------------------------------------------------------------

BLDDIR=$1
BLDBIN=$1/bin
BLDLIB=$1/lib:$LD_LIBRARY_PATH
AIFLAG="-f assert"
AIEXEC="$BLDBIN/aleph $AIFLAG"

echo "testing: $2"
LD_LIBRARY_PATH=$BLDLIB $AIEXEC $2
if [ "$?" != "0" ]; then
	echo "failure: $2"
	exit 1
fi
exit 0
