========
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
-----

.. literalinclude:: bits/ctest-to-usage.txt

-------
Example
-------

Here are some examples generated by the ctest file for this repository:

.. code::

    [
      {
        "name": "cmake_format-TestAddCustomCommand",
        "argv": [
          "python",
          "-Bm",
          "cmake_format.command_tests",
          "TestAddCustomCommand"
        ],
        "cwd": "/code/cmake_format/.build/nd.x86/cmake_format/command_tests",
        "props": {
          "working_directory": "/code/cmake_format"
        }
      },
      {
        "name": "cmake_format-TestAddCustomCommand_py3",
        "argv": [
          "python3",
          "-Bm",
          "cmake_format.command_tests",
          "TestAddCustomCommand"
        ],
        "cwd": "/code/cmake_format/.build/nd.x86/cmake_format/command_tests",
        "props": {
          "working_directory": "/code/cmake_format"
        }
      },
    ...
    ]

.. code::

    <ctest>
      <test cwd="/code/cmake_format/.build/nd.x86/cmake_format/command_tests" name="cmake_format-TestAddCustomCommand" working_directory="/code/cmake_format">
        <argv>
          <arg value="python"/>
          <arg value="-Bm"/>
          <arg value="cmake_format.command_tests"/>
          <arg value="TestAddCustomCommand"/>
        </argv>
      </test>
      <test cwd="/code/cmake_format/.build/nd.x86/cmake_format/command_tests" name="cmake_format-TestAddCustomCommand_py3" working_directory="/code/cmake_format">
        <argv>
          <arg value="python3"/>
          <arg value="-Bm"/>
          <arg value="cmake_format.command_tests"/>
          <arg value="TestAddCustomCommand"/>
        </argv>
      </test>
    ...
    </ctest>
