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.
results to the CDash server.
The generated error message is the following: "Error message was: Illegal characters found in URL"
Diagnostic:
If the environment variable CDASH_SUBMIT_LOCAL_HOST_ID is not initialized, the FQN hostname of the
system will be picked by the CMake/CTest scripts. The CTest internal system command used for retrieving
the FQN hostname is indeed leaving a carriage return in the returned hostname string.
That string is in turn reused to construct an URL that will be shared with the CDash service. The presence
of such characters (\n and \r) is no longer accepted by newer versions of CTest/CMake.
Solution:
The solution is simply to check and remove such characters from the hostname string.
For each test case, add a label from the name of the top most tutorial
directories (eg: basic, incompressible, etc). We will use this label in order
to categorize the various test cases under a more generic 'topic', so we can
for instance limit the testharness to only the suite of 'compressible' test
cases, etc., simply by using the ctest -L command.
ctest --print-labels will print the list of all available labels.
allow overriding CTestConfig.cmake values for using local site CDash service or
for using personnal (user space) CDash service. The expected order of precedence
is respected: the personnal settings will override the site settings, and the
site settings will override the default settings for the foam-extend CDash
service hosted on SourceForge.net.
the SCM information that gets appended at the end of the buildname string.
The buildname string is the string that will identify your test run when
published on the foam-extend CDash service.
When using git, this SCM information is picked up automatically from the CTest
script: -git-branch=the_git_branch_name-git-rev=the_git_revision_number.
But when using a non-git SCM (mercurial, etc), when the foam-extend source
code you are testing is not under a valid git repository, or simply when a user
needs to add more details to the standard SCM information (branch name and
revision number), then setting the environment variable CDASH_SCM_INFO to the
proper information will allow you to override the suffix we add at the end of
the buildname.
Please note that in order to keep the CMake script simple, for non-git
repositories, the fallback solution to try grabbing the information through
Mercurial has been removed. Please use the CDASH_SCM_INFO environment
varible instead.