mirror of
https://github.com/nwchemgit/nwchem.git
synced 2026-07-27 21:55:30 -04:00
HvD: A little script to save a lot of typing while checking the results
from a QA run.
This commit is contained in:
parent
b23cda16df
commit
f4e130fb36
2 changed files with 67 additions and 0 deletions
20
contrib/validate/get_tests.bash
Executable file
20
contrib/validate/get_tests.bash
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# get_tests.bash
|
||||
# --------------
|
||||
#
|
||||
# Go through the output of the QA run and extract the names of all the test
|
||||
# cases that were run. The list of tests run is echoed to standard output.
|
||||
#
|
||||
# Arguments:
|
||||
#
|
||||
# - $0: The name of this script
|
||||
# - $1: The log filename from the QA test suite run
|
||||
#
|
||||
job_list=`grep -v 'QM: Running' $1 | grep Running`
|
||||
for job in $job_list; do
|
||||
if [ $job != "Running" ] ; then
|
||||
testname=`basename $job`
|
||||
echo $testname
|
||||
fi
|
||||
done
|
||||
47
contrib/validate/validate
Executable file
47
contrib/validate/validate
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Validate
|
||||
# ========
|
||||
#
|
||||
# Go through the output of the QA test suite run, and for every test case
|
||||
# that failed summarize the differences.
|
||||
#
|
||||
# Command line arguments:
|
||||
#
|
||||
# - $0: this script
|
||||
# - $1: the name of the log file
|
||||
#
|
||||
# First we want to know where we are so that we can invoke the scripts we
|
||||
# need. The scripts we need live in the same location as this file.
|
||||
#
|
||||
if [ -f "$0" ] ; then
|
||||
# The first item on the command line is an actual file so it must have
|
||||
# been specified including the path.
|
||||
path="`dirname \"$0\"`"
|
||||
else
|
||||
# The first item on the command line is not a file so it must have been
|
||||
# found in PATH.
|
||||
path="`which \"$0\"`"
|
||||
path="`dirname \"$path\"`"
|
||||
fi
|
||||
testlist=`$path/get_tests.bash $1`
|
||||
for tcase in $testlist; do
|
||||
if [ -f testoutputs/${tcase}.out.nwparse ] ; then
|
||||
# This is a regular test case that completed.
|
||||
diff testoutputs/${tcase}.ok.out.nwparse testoutputs/${tcase}.out.nwparse > /dev/null
|
||||
stat=$?
|
||||
if [ ${stat} -ne 0 ] ; then
|
||||
tkdiff testoutputs/${tcase}.ok.out.nwparse testoutputs/${tcase}.out.nwparse
|
||||
fi
|
||||
elif [ -f testoutputs/${tcase}.ok.tst ] ; then
|
||||
# This is a molecular dynamics simulation.
|
||||
diff testoutputs/${tcase}.ok.tst testoutputs/${tcase}.top > /dev/null
|
||||
stat=$?
|
||||
if [ ${stat} -ne 0 ] ; then
|
||||
tkdiff testoutputs/${tcase}.ok.tst testoutputs/${tcase}.top
|
||||
fi
|
||||
else
|
||||
# This is a regular test case that crashed.
|
||||
tkdiff testoutputs/${tcase}.ok.out testoutputs/${tcase}.out
|
||||
fi
|
||||
done
|
||||
Loading…
Add table
Add a link
Reference in a new issue