#!/bin/sh
# ----------------------------------------------------------------------------
# - 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-2000 amaury darsch                                    -
# ----------------------------------------------------------------------------

TOPDIR=$1
RELDIR=$2
BINDIR=$2/bin
LIBDIR=$2/lib
ALSDIR=$1/src/library/als

AIFLAG="-f assert"
AIEXEC="$BINDIR/aleph $AIFLAG"

echo "testing : " $3

(export LD_LIBRARY_PATH;LD_LIBRARY_PATH=$LIBDIR; $AIEXEC $3)

if [ "$?" != "0" ]; then
	echo "test failure : " $3
	exit 1
fi

exit 0
