mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-28 06:05:44 -04:00
HvD: Extended the validate script so that one can choose the diff
program to be used in generating the results for the user. The default still is tkdiff which represents the diff output graphically. However, one can set the environment variable VAL_DIFF to select something else.
This commit is contained in:
parent
dca9122e6f
commit
bbadd00d57
1 changed files with 15 additions and 4 deletions
|
|
@ -24,6 +24,17 @@ else
|
|||
path="`which \"$0\"`"
|
||||
path="`dirname \"$path\"`"
|
||||
fi
|
||||
if [ ${#VAL_DIFF} -eq 0 ] ; then
|
||||
VAL_DIFF=`which tkdiff`
|
||||
fi
|
||||
if [ ${#VAL_DIFF} -eq 0 ] ; then
|
||||
VAL_DIFF=`which diff`
|
||||
fi
|
||||
if [ ${#VAL_DIFF} -eq 0 ] ; then
|
||||
echo "Found no diff program. Giving up..."
|
||||
exit 10
|
||||
fi
|
||||
export VAL_DIFF
|
||||
testlist=`$path/get_tests.bash $1`
|
||||
for tcase in $testlist; do
|
||||
if [ -f testoutputs/${tcase}.out.nwparse ] ; then
|
||||
|
|
@ -33,7 +44,7 @@ for tcase in $testlist; do
|
|||
stat=$?
|
||||
if [ ${stat} -ne 0 ] ; then
|
||||
echo " ... failed ... diffing ..."
|
||||
tkdiff testoutputs/${tcase}.ok.out.nwparse testoutputs/${tcase}.out.nwparse
|
||||
${VAL_DIFF} testoutputs/${tcase}.ok.out.nwparse testoutputs/${tcase}.out.nwparse
|
||||
else
|
||||
echo " ... OK"
|
||||
fi
|
||||
|
|
@ -45,7 +56,7 @@ for tcase in $testlist; do
|
|||
stat=$?
|
||||
if [ ${stat} -ne 0 ] ; then
|
||||
echo " ... failed ... diffing ..."
|
||||
tkdiff testoutputs/${tcase}.ok.tst testoutputs/${tcase}.top
|
||||
${VAL_DIFF} testoutputs/${tcase}.ok.tst testoutputs/${tcase}.top
|
||||
else
|
||||
echo " ... OK"
|
||||
fi
|
||||
|
|
@ -55,7 +66,7 @@ for tcase in $testlist; do
|
|||
stat=$?
|
||||
if [ ${stat} -ne 0 ] ; then
|
||||
echo " ... failed ... diffing ..."
|
||||
tkdiff testoutputs/${tcase}.ok.tst testoutputs/${tcase}.tst
|
||||
${VAL_DIFF} testoutputs/${tcase}.ok.tst testoutputs/${tcase}.tst
|
||||
else
|
||||
echo " ... OK"
|
||||
fi
|
||||
|
|
@ -63,7 +74,7 @@ for tcase in $testlist; do
|
|||
else
|
||||
# This is a regular test case that crashed.
|
||||
echo "Test:" ${tcase} " ... failed ... diffing ..."
|
||||
tkdiff testoutputs/${tcase}.ok.out testoutputs/${tcase}.out
|
||||
${VAL_DIFF} testoutputs/${tcase}.ok.out testoutputs/${tcase}.out
|
||||
fi
|
||||
done
|
||||
echo "... All Done ..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue