https://github.com/Kitware/CMake
Revision 75aa3ee7e724e0f6c3d2707565519041efe1443f authored by Stefan Floeren on 25 June 2020, 14:57:43 UTC, committed by Brad King on 26 June 2020, 13:39:51 UTC
The Google test framework allows to write the results into an XML file
since commit e9ab39eb1d (GoogleTest: Add XML_OUTPUT_DIR parameter,
2020-03-06, v3.18.0-rc1~538^2~2).  This file is passed on the command
line: `--gtest_output=xml:FILE_NAME`.

The module allows to specify a directory to save those files with
**TEST_XML_OUTPUT_PARAM**.

If the option is set, the filename will be set to
`${prefix}${pretty_suite}.${pretty_test}${suffix}.xml`.

The pretty names contain parameters for the tests, if
value-parameterized tests are used. These parameters may not be safe to
use in file names.

There are two possible options:

1. sanitize the file name
2. omit the values and use the internal numbering of gtest

This commit chose option 2. The testname needs to be a valid C++
identifier and should therefore be reasonable for a filename.

Note that the generated names contain slashes. This will lead to
subdirectories, but works on both Linux and Windows.

Fixes: #20877
1 parent e66fe75
History
Tip revision: 75aa3ee7e724e0f6c3d2707565519041efe1443f authored by Stefan Floeren on 25 June 2020, 14:57:43 UTC
GoogleTest: Fix name generation for XML_OUTPUT_DIR
Tip revision: 75aa3ee
File Mode Size
.github
.gitlab
Auxiliary
Help
Licenses
Modules
Packaging
Source
Templates
Tests
Utilities
.clang-format -rw-r--r-- 1.3 KB
.clang-tidy -rw-r--r-- 1.1 KB
.gitattributes -rw-r--r-- 1.1 KB
.gitignore -rw-r--r-- 132 bytes
.gitlab-ci.yml -rw-r--r-- 4.4 KB
.hooks-config -rw-r--r-- 418 bytes
CMakeCPack.cmake -rw-r--r-- 9.7 KB
CMakeCPackOptions.cmake.in -rw-r--r-- 11.9 KB
CMakeGraphVizOptions.cmake -rw-r--r-- 153 bytes
CMakeLists.txt -rw-r--r-- 33.4 KB
CMakeLogo.gif -rw-r--r-- 4.4 KB
CONTRIBUTING.rst -rw-r--r-- 3.0 KB
CTestConfig.cmake -rw-r--r-- 513 bytes
CTestCustom.cmake.in -rw-r--r-- 7.1 KB
CompileFlags.cmake -rw-r--r-- 4.2 KB
Copyright.txt -rw-r--r-- 5.2 KB
DartConfig.cmake -rw-r--r-- 374 bytes
README.rst -rw-r--r-- 3.9 KB
bootstrap -rwxr-xr-x 53.6 KB
cmake_uninstall.cmake.in -rw-r--r-- 789 bytes
configure -rwxr-xr-x 99 bytes
doxygen.config -rw-r--r-- 27.4 KB

README.rst

back to top