test_all.sh create now a log file

This commit is contained in:
Laurent Saboret 2008-08-20 14:31:55 +00:00
parent e93e696f40
commit 5e61260a99
4 changed files with 21 additions and 7 deletions

View File

@ -5,8 +5,5 @@ rem Double-clickable version of test_all.sh on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=%PATH%;c:\Applis\cygwin\bin
rem Create test folder (if needed)
mkdir test
sh ./test_all.sh 2>&1 | tee test/test_all.log
sh ./test_all.sh
pause

View File

@ -8,6 +8,7 @@
ERRORFILE=error.txt
# Find executable name (different on Windows and Unix)
# ----------------------------------------------------
find_executable()
{
PARAM_APPLICATION=""
@ -20,6 +21,7 @@ find_executable()
}
# run 1 test
# ----------
run()
{
# Find exe
@ -43,13 +45,18 @@ run()
echo "------------------------------------------------------------------"
echo
if eval $COMMAND 2>&1 ; then
echo " succesful execution of $1" >> $ERRORFILE
echo " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
echo
}
# main
# ----
(
# remove the previous error file
rm -f $ERRORFILE
touch $ERRORFILE
@ -78,4 +85,5 @@ cat $ERRORFILE
echo
rm -f $ERRORFILE
) 2>&1 | tee test_all.log

View File

@ -5,5 +5,5 @@ rem Double-clickable version of test_all.sh on Windows/Cygwin
rem Path to Cygwin is hard-coded
PATH=%PATH%;c:\Applis\cygwin\bin
sh ./test_all.sh 2>&1 | tee test_all.log
sh ./test_all.sh
pause

View File

@ -8,6 +8,7 @@
ERRORFILE=error.txt
# Find executable name (different on Windows and Unix)
# ----------------------------------------------------
find_executable()
{
PARAM_APPLICATION=""
@ -20,6 +21,7 @@ find_executable()
}
# run 1 test
# ----------
run()
{
# Find exe
@ -43,13 +45,18 @@ run()
echo "------------------------------------------------------------------"
echo
if eval $COMMAND 2>&1 ; then
echo " succesful execution of $1" >> $ERRORFILE
echo " successful execution of $1" >> $ERRORFILE
else
echo " ERROR: execution of $1" >> $ERRORFILE
fi
echo
}
# main
# ----
(
# remove the previous error file
rm -f $ERRORFILE
touch $ERRORFILE
@ -72,3 +79,5 @@ cat $ERRORFILE
echo
rm -f $ERRORFILE
) 2>&1 | tee test_all.log