summaryrefslogtreecommitdiff
path: root/test/run-stp-tests.sh
diff options
context:
space:
mode:
authorMichael Sweet <michael.r.sweet@gmail.com>2017-06-16 17:39:13 -0400
committerMichael Sweet <michael.r.sweet@gmail.com>2017-06-16 17:39:13 -0400
commitd2f1a784c46310f86c34434e9bf447f060bf0ec2 (patch)
treec9e740a07f702e578b39ab546297fe70f10ac2bd /test/run-stp-tests.sh
parent62825d3445a090e1f73619c65732a7cdc8e7cb80 (diff)
Fix "make check" failure (Issue #5033)
Diffstat (limited to 'test/run-stp-tests.sh')
-rwxr-xr-xtest/run-stp-tests.sh32
1 files changed, 13 insertions, 19 deletions
diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh
index 54ed7fbf4..792f10d70 100755
--- a/test/run-stp-tests.sh
+++ b/test/run-stp-tests.sh
@@ -1105,29 +1105,23 @@ done
cat str-trailer.html >>$strfile
echo ""
+for file in $BASE/log/*_log; do
+ baselog=`basename $file`
+ cp $file $baselog-$date-$user
+ echo "Copied log file \"$baselog-$date-$user\" to test directory."
+done
+cp $strfile .
+echo "Copied report file \"cups-str-$date-$user.html\" to test directory."
-if test $fail != 0; then
- echo "$fail tests failed."
-
- for file in $BASE/log/*_log; do
- baselog=`basename $file`
- cp $file $baselog-$date-$user
- echo "Copied log file \"$baselog-$date-$user\" to test directory."
- done
- cp $strfile .
- echo "Copied report file \"cups-str-$date-$user.html\" to test directory."
+# Clean out old failure log files after 1 week...
+find . -name \*_log-\*-$user -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old log file \"" substr($1,3) "\" from test directory."}'
+find . -name cups-str-\*-$user.html -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old report file \"" $1 "\" from test directory."}'
- # Clean out old failure log files after 1 week...
- find . -name \*_log-\*-$user -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old log file \"" substr($1,3) "\" from test directory."}'
- find . -name cups-str-\*-$user.html -a -mtime +1w -print -exec rm -f '{}' \; | awk '{print "Removed old report file \"" $1 "\" from test directory."}'
+echo ""
- echo ""
+if test $fail != 0; then
+ echo "$fail tests failed."
exit 1
-
else
echo "All tests were successful."
- echo ""
- echo "Log files can be found in $BASE/log."
- echo "A HTML report was created in $strfile."
- echo ""
fi