CTest: add more convenient flags for end user

Hello, I suggest to add the alias --list-tests for -N command line option (as it is more noticeable for user) and to add to short command line --TD for --test-dir.

Dear @brad.king , @craig.scott , @ben.boeckel , that do you think about these additions? (sorry for mention)

Thanks in advance.

1 Like

Adding a longer name for -N seems fine to me. I don’t think --TD makes much sense though.

1 Like

We already have a longer alias for -N:

$ ctest --help | grep -- -N
  -N,--show-only[=format]      = Disable actual execution of tests.  The

Yes, but we may add an another alias, which are (at my opinion) more consistent and sound (see also e.g., --list-presets). We can slightly update the help message, adding the something like “Disable actual execution of tests, only lists them. The optional ‘format’ …”

-N,--show-only are not just about listing. With -N -V one gets all the test command line shown. With --show-only=json-v1 one gets a JSON document detailing the tests. I don’t think we need to add more names for existing options.

The ctest --list-presets name evolved separately to match cmake --list-presets.

1 Like