git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phillip Wood <phillip.wood123@gmail.com>
To: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Cc: Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v2 6/7] cmake: use test names instead of full paths
Date: Fri, 22 Sep 2023 15:37:20 +0100	[thread overview]
Message-ID: <7d1d78c5-5781-4f5e-90f3-c02e74af31b2@gmail.com> (raw)
In-Reply-To: <41228df1b469d9a79f3278fe8c1ca37082600669.1695070468.git.gitgitgadget@gmail.com>

Hi Johannes

On 18/09/2023 21:54, Johannes Schindelin via GitGitGadget wrote:
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
> 
> The primary purpose of Git's CMake definition is to allow developing Git
> in Visual Studio. As part of that, the CTest feature allows running
> individual test scripts conveniently in Visual Studio's Test Explorer.
> 
> However, this Test Explorer's design targets object-oriented languages
> and therefore expects the test names in the form
> `<namespace>.<class>.<testname>`. And since we specify the full path
> of the test scripts instead, including the ugly `/.././t/` part, these
> dots confuse the Test Explorer and it uses a large part of the path as
> "namespace".
> 
> Let's just use `t.<name>` instead. This still adds an ugly "Empty
> Namespace" layer by default, but at least the ugly absolute path is now
> gone.

That does sound like a worthwhile improvement. If we used `git.t.<name>` 
would that fix the "Empty Namespace" problem? (probably not worth a 
re-roll on its own)

Best Wishes

Phillip

> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>   contrib/buildsystems/CMakeLists.txt | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
> index ad197ea433f..ff1a8cc348f 100644
> --- a/contrib/buildsystems/CMakeLists.txt
> +++ b/contrib/buildsystems/CMakeLists.txt
> @@ -1106,13 +1106,14 @@ file(GLOB test_scripts "${CMAKE_SOURCE_DIR}/t/t[0-9]*.sh")
>   
>   #test
>   foreach(tsh ${test_scripts})
> -	add_test(NAME ${tsh}
> +	string(REGEX REPLACE ".*/(.*)\\.sh" "\\1" test_name ${tsh})
> +	add_test(NAME "t.${test_name}"
>   		COMMAND ${SH_EXE} ${tsh} --no-bin-wrappers --no-chain-lint -vx
>   		WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/t)
>   endforeach()
>   
>   # This test script takes an extremely long time and is known to time out even
>   # on fast machines because it requires in excess of one hour to run
> -set_tests_properties("${CMAKE_SOURCE_DIR}/t/t7112-reset-submodule.sh" PROPERTIES TIMEOUT 4000)
> +set_tests_properties("t.t7112-reset-submodule" PROPERTIES TIMEOUT 4000)
>   
>   endif()#BUILD_TESTING

  reply	other threads:[~2023-09-22 14:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31  6:15 [PATCH 0/4] CMake(Visual C) support for js/doc-unit-tests Johannes Schindelin via GitGitGadget
2023-08-31  6:15 ` [PATCH 1/4] cmake: also build unit tests Johannes Schindelin via GitGitGadget
2023-09-11 13:23   ` Phillip Wood
2023-09-18 20:58     ` Johannes Schindelin
2023-08-31  6:15 ` [PATCH 2/4] unit-tests: do not mistake `.pdb` files for being executable Johannes Schindelin via GitGitGadget
2023-08-31  6:15 ` [PATCH 3/4] unit-tests: do show relative file paths Johannes Schindelin via GitGitGadget
2023-09-11 13:25   ` Phillip Wood
2023-09-18 21:00     ` Johannes Schindelin
2023-08-31  6:15 ` [PATCH 4/4] artifacts-tar: when including `.dll` files, don't forget the unit-tests Johannes Schindelin via GitGitGadget
2023-09-18 20:54 ` [PATCH v2 0/7] CMake(Visual C) support for js/doc-unit-tests Johannes Schindelin via GitGitGadget
2023-09-18 20:54   ` [PATCH v2 1/7] cmake: also build unit tests Johannes Schindelin via GitGitGadget
2023-09-18 20:54   ` [PATCH v2 2/7] unit-tests: do not mistake `.pdb` files for being executable Johannes Schindelin via GitGitGadget
2023-09-18 20:54   ` [PATCH v2 3/7] unit-tests: do show relative file paths Johannes Schindelin via GitGitGadget
2023-09-22 14:35     ` Phillip Wood
2023-09-18 20:54   ` [PATCH v2 4/7] artifacts-tar: when including `.dll` files, don't forget the unit-tests Johannes Schindelin via GitGitGadget
2023-09-18 20:54   ` [PATCH v2 5/7] cmake: fix typo in variable name Johannes Schindelin via GitGitGadget
2023-09-18 20:54   ` [PATCH v2 6/7] cmake: use test names instead of full paths Johannes Schindelin via GitGitGadget
2023-09-22 14:37     ` Phillip Wood [this message]
2023-09-25  9:06       ` Johannes Schindelin
2023-09-18 20:54   ` [PATCH v2 7/7] cmake: handle also unit tests Johannes Schindelin via GitGitGadget
2023-09-22 14:39     ` Phillip Wood
2023-09-25 11:20   ` [PATCH v3 0/7] CMake(Visual C) support for js/doc-unit-tests Johannes Schindelin via GitGitGadget
2023-09-25 11:20     ` [PATCH v3 1/7] cmake: also build unit tests Johannes Schindelin via GitGitGadget
2023-09-25 11:20     ` [PATCH v3 2/7] unit-tests: do not mistake `.pdb` files for being executable Johannes Schindelin via GitGitGadget
2023-09-25 11:20     ` [PATCH v3 3/7] unit-tests: do show relative file paths Johannes Schindelin via GitGitGadget
2023-09-25 11:20     ` [PATCH v3 4/7] artifacts-tar: when including `.dll` files, don't forget the unit-tests Johannes Schindelin via GitGitGadget
2023-09-25 11:20     ` [PATCH v3 5/7] cmake: fix typo in variable name Johannes Schindelin via GitGitGadget
2023-09-25 11:20     ` [PATCH v3 6/7] cmake: use test names instead of full paths Johannes Schindelin via GitGitGadget
2023-09-25 11:20     ` [PATCH v3 7/7] cmake: handle also unit tests Johannes Schindelin via GitGitGadget
2023-09-25 19:09     ` [PATCH v3 0/7] CMake(Visual C) support for js/doc-unit-tests Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7d1d78c5-5781-4f5e-90f3-c02e74af31b2@gmail.com \
    --to=phillip.wood123@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=johannes.schindelin@gmx.de \
    --cc=phillip.wood@dunelm.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).