summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
diff options
context:
space:
mode:
authorStefan Floeren <stefan.floeren@smartronic.de>2020-06-30 09:29:53 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-01 10:48:19 (GMT)
commit7b92e116830805e61a86119071e56b47eb5dd51c (patch)
tree7b9d258ae07b7a179bc94c1a6d563fb6f42341a7 /Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
parent77ba7539adb805b154b778046eda491b40acf09e (diff)
downloadCMake-7b92e116830805e61a86119071e56b47eb5dd51c.zip
CMake-7b92e116830805e61a86119071e56b47eb5dd51c.tar.gz
CMake-7b92e116830805e61a86119071e56b47eb5dd51c.tar.bz2
Tests: Add test for GoogleTest XML_OUTPUT_DIR
Add tests to make sure the XML_OUTPUT_DIR is generated correctly and the correct files are getting created.
Diffstat (limited to 'Tests/RunCMake/GoogleTest/GoogleTestXML.cmake')
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTestXML.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
index 29bd05e..fb91c0e 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
+++ b/Tests/RunCMake/GoogleTest/GoogleTestXML.cmake
@@ -3,6 +3,17 @@ include(GoogleTest)
enable_testing()
+# This creates the folder structure for the paramterized tests
+# to avoid handling missing folders in C++
+#
+# This must match the match the name defined in xml_output.cpp
+# for every instance of tests with GetParam.
+#
+# The folder name is created fom the test name (output of the line
+# without leading spaces: "GoogleTestXMLSpecial/cases.") and
+# the parts until the last slash ("case/"). These parts are concatenated.
+file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/GoogleTestXMLSpecial/cases.case")
+
add_executable(xml_output xml_output.cpp)
gtest_discover_tests(
xml_output