-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added comments and minor logic updates to rt.summary.sh.
Fixes #1016
- Loading branch information
George Gayno
committed
Feb 28, 2025
1 parent
92df3b8
commit bda79d8
Showing
1 changed file
with
33 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,55 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -eux | ||
|
||
#-------------------------------------------------------------------------- | ||
# This script runs once all tests have completed. It checks for | ||
# failed tests and creates some final log files. | ||
#-------------------------------------------------------------------------- | ||
|
||
cd $PATHRT | ||
|
||
rm -f fail_test | ||
#-------------------------------------------------------------------------- | ||
# If there are any failed tests, combine the log files into one log | ||
# called 'fail_test'. | ||
#-------------------------------------------------------------------------- | ||
|
||
rm -f failed_tests | ||
FAIL_FILES="fail_test_*" | ||
for file in $FAIL_FILES; do | ||
if [[ -f "$file" ]]; then | ||
cat "$file" >> fail_test | ||
cat "$file" >> failed_tests | ||
rm -f $file | ||
fi | ||
done | ||
|
||
rm -f RegressionTests_$target.$compiler.log | ||
#-------------------------------------------------------------------------- | ||
# Combine the run logs for each test into one log. | ||
#-------------------------------------------------------------------------- | ||
|
||
LOG_FILE=RegressionTests_${target}.${compiler}.log | ||
rm -f $LOG_FILE | ||
for file in RegressionTests_$target.${compiler}.*.log | ||
do | ||
if [[ -f "$file" ]]; then | ||
cat "$file" >> RegressionTests_$target.$compiler.log | ||
cat "$file" >> $LOG_FILE | ||
rm -f $file | ||
fi | ||
done | ||
|
||
#-------------------------------------------------------------------------- | ||
# Summarize the results in summary.log. | ||
#-------------------------------------------------------------------------- | ||
|
||
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 | ||
if [[ -e "failed_tests" ]]; then | ||
echo | tee -a $LOG_FILE | ||
cat failed_tests >>$LOG_FILE | ||
cat failed_tests >>summary.log | ||
else | ||
echo | tee -a RegressionTests_$target.$compiler.log | ||
echo "REGRESSION TEST WAS SUCCESSFUL" | tee -a RegressionTests_$target.$compiler.log | ||
echo | tee -a $LOG_FILE | ||
echo "REGRESSION TEST WAS SUCCESSFUL" | tee -a $LOG_FILE | ||
echo "All tests passed" >>summary.log | ||
fi | ||
|
||
exit 0 |