Commit 1be915e9 authored by Michael Hanus 's avatar Michael Hanus
Browse files

test script improved

parent ffa2204e
......@@ -2,13 +2,13 @@
# script to test the examples for the SQL preprocessor:
# Root location of the Curry System specified by variable CURRYROOT
CURRYROOT=`curry :set v0 :set -time :add Distribution :eval "putStrLn installDir" :quit`
CURRYROOT=`$CURRYBIN :set v0 :set -time :add Distribution :eval "putStrLn installDir" :quit`
CURRYBIN=$CURRYROOT/bin
CURRYBINDIR=$CURRYROOT/bin
if [ -x "$CURRYBIN/pakcs" ] ; then
if [ -x "$CURRYBINDIR/pakcs" ] ; then
CURRYEXEC=pakcs
elif [ -x "$CURRYBIN/kics2" ] ; then
elif [ -x "$CURRYBINDIR/kics2" ] ; then
CURRYEXEC=kics2
else
echo "ERROR: Unknown Curry system!"
......@@ -17,7 +17,7 @@ fi
ERD2CURRY=$HOME/.cpm/bin/erd2curry
if [ ! -x "$ERD2CURRY" ] ; then
ERD2CURRY=$CURRYBIN/$CURRYEXEC-erd2curry
ERD2CURRY=$CURRYBINDIR/$CURRYEXEC-erd2curry
if [ ! -x "$ERD2CURRY" ] ; then
echo "SQL integration not tested: no executable 'erd2curry' found!"
echo "To run the SQL integration test, install 'erd2curry' by:"
......@@ -34,14 +34,14 @@ if [ "$1" = "-v" ] ; then
fi
# use the right Curry system for the tests:
PATH=$CURRYBIN:$PATH
PATH=$CURRYBINDIR:$PATH
export PATH
cleandir () {
$CURRYBIN/cleancurry
$CURRYBINDIR/cleancurry
/bin/rm -f $LOGFILE *_PUBLIC.curry TEST*.curry
/bin/rm -f Uni.erdterm Uni_ERDT.term Uni_SQLCode.info Uni_CDBI.curry Uni.db
$CURRYBIN/cleancurry
$CURRYBINDIR/cleancurry
}
# compile and execute all tests:
......@@ -50,9 +50,9 @@ exectests() {
# compile model:
"$ERD2CURRY" --db `pwd`/Uni.db --cdbi UniERD.curry
# fill database:
$CURRYBIN/curry $REPL_OPTS :l CreateData :eval createTestData :q
$CURRYBINDIR/curry $REPL_OPTS :l CreateData :eval createTestData :q
# run query tests:
$CURRYBIN/curry check SelectExamples
$CURRYBINDIR/curry check SelectExamples
}
LOGFILE=xxx$$
......
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