mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: tutorials/Alltest -backup option
- for repeated tests (eg, during bisection) can be used to preserve the existing directory as tutorialsTest.bak01, tutorialsTest.bak02, ... (max of 10). - preserve the commit information as tutorialsTest/commit-info to help document the current or backup test results.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
# \\ / A nd | www.openfoam.com
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# Copyright (C) 2017-2021 OpenCFD Ltd.
|
||||
# Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
|
||||
@ -25,7 +25,7 @@
|
||||
# Extracts useful info from log file.
|
||||
logReport()
|
||||
{
|
||||
local logfile=$1
|
||||
local logfile="$1"
|
||||
|
||||
# logfile is path/to/case/log.application
|
||||
caseName=$(dirname $logfile | sed -e 's/\(.*\)\.\///g')
|
||||
@ -77,6 +77,7 @@ collectLogs()
|
||||
|
||||
local appDir log logFiles
|
||||
|
||||
echo "====" > testLoopReport
|
||||
for appDir in *
|
||||
do
|
||||
[ -d $appDir ] || continue
|
||||
@ -99,14 +100,15 @@ collectLogs()
|
||||
logReport $log
|
||||
done
|
||||
echo
|
||||
done > testLoopReport
|
||||
echo "===="
|
||||
done >> testLoopReport
|
||||
echo "====" >> testLoopReport
|
||||
echo "====" 1>&2
|
||||
}
|
||||
|
||||
|
||||
removeLogs()
|
||||
{
|
||||
echo "Removing backup files"
|
||||
echo "Removing backup files" 1>&2
|
||||
|
||||
find . \( \
|
||||
-name '*~' -o -name '*.bak' \
|
||||
|
||||
Reference in New Issue
Block a user