ctest-to¶
The ctest-to
program can parse listfiles from a ctest output tree and
generate a more structured representation of the test spec.
Usage¶
usage: ctest-to [-h] [--log-level {debug,info,warning,error}] [--json | --xml]
[directory]
Parse ctest testfiles and re-emit the test specification in a more structured
format.
positional arguments:
directory
optional arguments:
-h, --help show this help message and exit
--log-level {debug,info,warning,error}
--json
--xml
Example¶
Here are some examples generated by the ctest file for this repository:
[
{
"name": "cmakelang-TestAddCustomCommand",
"argv": [
"python",
"-Bm",
"cmakelang.command_tests",
"TestAddCustomCommand"
],
"cwd": "/code/cmakelang/.build/nd.x86/cmakelang/command_tests",
"props": {
"working_directory": "/code/cmakelang"
}
},
{
"name": "cmakelang-TestAddCustomCommand_py3",
"argv": [
"python3",
"-Bm",
"cmakelang.command_tests",
"TestAddCustomCommand"
],
"cwd": "/code/cmakelang/.build/nd.x86/cmakelang/command_tests",
"props": {
"working_directory": "/code/cmakelang"
}
},
...
]
<ctest>
<test cwd="/code/cmakelang/.build/nd.x86/cmakelang/command_tests" name="cmakelang-TestAddCustomCommand" working_directory="/code/cmakelang">
<argv>
<arg value="python"/>
<arg value="-Bm"/>
<arg value="cmakelang.command_tests"/>
<arg value="TestAddCustomCommand"/>
</argv>
</test>
<test cwd="/code/cmakelang/.build/nd.x86/cmakelang/command_tests" name="cmakelang-TestAddCustomCommand_py3" working_directory="/code/cmakelang">
<argv>
<arg value="python3"/>
<arg value="-Bm"/>
<arg value="cmakelang.command_tests"/>
<arg value="TestAddCustomCommand"/>
</argv>
</test>
...
</ctest>