diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/eigenexa/test/result-check.sh')
-rw-r--r-- | var/spack/repos/builtin/packages/eigenexa/test/result-check.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/eigenexa/test/result-check.sh b/var/spack/repos/builtin/packages/eigenexa/test/result-check.sh new file mode 100644 index 0000000000..a8a406ec23 --- /dev/null +++ b/var/spack/repos/builtin/packages/eigenexa/test/result-check.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +grep -q "Benchmark completed" $@ +if [ $? -eq 1 ]; then + echo "EigenExa Test Failed !" + exit 1 +fi + +while read line;do + case $line in + *'Eigenvalue Relative Error'* ) + tmp=$line + read line + if [[ "$line" != '|w| is too small, so it is not severe.' ]]; then + echo "${tmp}" >> output.txt + fi + ;; + *'Eigenvalue Absolute Error'* ) + tmp=$line + read line + if [ "$line" != 'Do not mind it. Condition number is too large.' ] && \ + [ "$line" != 'Do not mind it. Relative error is small enough' ]; then + echo "${tmp}" >> output.txt + fi + ;; + *'Residual Error Test'* | *'Orthogonality Test'* ) + echo "${line}" >> output.txt ;; + esac +done < $@ + +grep -q "FAILED" output.txt +if [ $? -eq 1 ]; then + echo "EigenExa Test Passed !" +elif [ $? -eq 0 ]; then + echo "EigenExa Test Failed !" +fi |