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:
Mark Olesen
2022-11-19 13:31:33 +01:00
parent 1b11e4b3ac
commit db57c456f6
2 changed files with 63 additions and 15 deletions

View File

@ -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' \