Skip to content

Commit

Permalink
Add a script that creates the 'summary' log files.
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeGayno-NOAA committed Jan 23, 2025
1 parent 9621d56 commit 3df360a
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
33 changes: 33 additions & 0 deletions reg_tests/cpld_gridgen/rt.summary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

set -x

cd $PATHRT

FAIL_FILES="fail_test_*"
for file in $FAIL_FILES; do
if [[ -f "$file" ]]; then
cat "$file" >> fail_test
fi
done

for file in RegressionTests_$target.${compiler}.*.log
do
if [[ -f "$file" ]]; then
cat "$file" >> RegressionTests_$target.$compiler.log
rm -f $file
fi
done

rm -f summary.log
if [[ -e fail_test ]]; then
echo | tee -a RegressionTests_$target.$compiler.log
for file in fail_test_*; do
cat $file >>RegressionTests_$target.$compiler.log
cat $file >>summary.log
done
else
echo | tee -a RegressionTests_$target.$compiler.log
echo "REGRESSION TEST WAS SUCCESSFUL" | tee -a RegressionTests_$target.$compiler.log
echo "All tests passed" >>summary.log
fi
7 changes: 3 additions & 4 deletions reg_tests/cpld_gridgen/rt2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@ while read -r line || [ "$line" ]; do
((i=i+1))
done < ./rt.conf

export target

sbatch --nodes=1 -t 0:01:00 -A fv3-cpu -J summary -o logx -e logx \
--open-mode=append -q batch -d afterok${all_tests} << EOF
#!/bin/bash
grep -a 'finished test' log* > summary.log
EOF
--open-mode=append -q batch -d afterok${all_tests} ./rt.summary.sh

exit

0 comments on commit 3df360a

Please sign in to comment.