Re: [PATCH v3 4/8] cmake: support for testing git with ctest
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- May 30, 2020, 13:49 UTC
- Message-ID
- <20200530134923.GB2151@danh.dev>
- In-Reply-To
- <cdc53172b3f073095911fe9f7f5ff8ea6546013c.1590759624.git.gitgitgadget@gmail.com>
On 2020-05-29 13:40:20+0000, Sibi Siddharthan via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 8 quoted lines
> From: Sibi Siddharthan <sibisiddharthan.github@gmail.com> > > This patch provides an alternate way to test git using ctest. > CTest ships with CMake, so there is no additional dependency being > introduced. > > To perform the tests with ctest do this after building: > ctest -j[number of jobs]
Or we can just run: make test CMake will run: ctest itself.
Ah, OK, that's not equivalence. make -j9 test doesn't work :/
Anyway, there're test is failing in Linux with this CMake.
$git_repo/t/../build/bin-wrappers/git is not executable; using GIT_EXEC_PATH
It looks like CMake Generator forgets "chmod +x bin-wrappers/git"
> Test time = 1.11 sec > > NOTE: Testing only works when building in source for now.
OK, so this maybe the pain point, let me build in source again. Hm, no, I still see the same problems. Worse, CMake overrides my current Makefile. Luckily, I don't have any changes in Makefile.
> +endif()#BUILD_TESTING
We can use:
endif(BUILD_TESTING)
-- Danh