Re: [PATCH v3 4/8] cmake: support for testing git with ctest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 30, 2020 at 7:19 PM Đoàn Trần Công Danh
<congdanhqx@xxxxxxxxx> wrote:
>
> On 2020-05-29 13:40:20+0000, Sibi Siddharthan via GitGitGadget <gitgitgadget@xxxxxxxxx> wrote:
> > From: Sibi Siddharthan <sibisiddharthan.github@xxxxxxxxx>
> >
> > 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 :/
>

No, it does not.
make test -> ctest --force-new-ctest-process.

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

CMake does not support changing permissions of files easily.
You have to juggle them around to a temporary location and
change the permissions when you do `file(COPY ...)`.

Will look into this.

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

Please read the next PATCH, it supports out of source building and testing.

> > +endif()#BUILD_TESTING
>
> We can use:
>
>         endif(BUILD_TESTING)
>

The docs suggest that this way of endif() is for backwards compat only.
Not sure if I should change this, as CMake might remove this in the
future(very unlikely though).

Thank You,
Sibi Siddharthan

> --
> Danh




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux