========
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": "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"
        }
      },
    ...
    ]

.. code::

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