From a2496c13886f289f687caa6bd6a782cbde59f757 Mon Sep 17 00:00:00 2001 From: Martin Beaudoin Date: Mon, 15 Jul 2019 23:13:43 -0400 Subject: [PATCH] Bugfix for the testHarness runFunctions: When using the '-l' option for the runApplicationAndReportOnError macro in the tutorials Allrun files, the default log filename will be overriden. In case of a runtime error for a testHarness test, we need to dump the last 50 lines from this filename instead of using the default log filename. --- testHarness/foam-extend/4.1/scripts/AdditionalRunFunctions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testHarness/foam-extend/4.1/scripts/AdditionalRunFunctions b/testHarness/foam-extend/4.1/scripts/AdditionalRunFunctions index 9ec85855a..f2c2331e1 100644 --- a/testHarness/foam-extend/4.1/scripts/AdditionalRunFunctions +++ b/testHarness/foam-extend/4.1/scripts/AdditionalRunFunctions @@ -36,10 +36,10 @@ verbose_report_on_runApplication_error() if [ "$reportOnErrorOnlyOnce" ] ; then echo " " echo " => Error running $APP_RUN..." - echo " => Here are the last 50 lines of the log file log.$APP_RUN..." + echo " => Here are the last 50 lines of the log file $LOG_NAME..." echo " " - if [ -f log.$APP_RUN ] ; then - tail -50 log.$APP_RUN + if [ -f $LOG_NAME ] ; then + tail -50 $LOG_NAME exit $ecode; fi fi