guix-devel
[Top][All Lists]
Advanced

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

Re: Package gmsh: best practise with test-suite?


From: Christopher Baines
Subject: Re: Package gmsh: best practise with test-suite?
Date: Mon, 11 Feb 2019 20:21:30 +0000
User-agent: mu4e 1.0; emacs 26.1

zimoun <address@hidden> writes:

> On Mon, 11 Feb 2019 at 20:38, Christopher Baines <address@hidden> wrote:
>> zimoun <address@hidden> writes:
>>
>> > What is the better?
>> >  a- Patch the CMakeLists.txt to generate only the right tests
>> >  b- Turn off all the tests
>>
>> There may be a third option, run only the tests that are known to pass.
>>
>> I know very little about CMake, but I searched for ctest, which is
>> something mentioned in the CMakeLists.txt file, and it brought up this
>> [1] which mentions --exclude-regex and --label-exclude. Maybe these
>> could somehow be passed in, or maybe set through environment variables?
>
> From my understanding, the cmake-build-system calls "make test" and
> not "ctest". Right?

I think CMake generates the Makefile, so I would guess that "make test"
might end up running "ctest".

> If I understand well, the idea should be to turn off the all tests
> ("#:tests? #f") and to add a final phase calling "ctest" with the
> correct tests. Does this make sense?

That would work, but in my opinion a neater approach would be to keep
#:tests? as #t, and replace the 'check phase to call ctest with the
required arguments. Then #:tests? still works as an argument. Something
like...

(arguments
 '(#:phases
   (modify-phases %standard-phases
     (replace 'check
       (lambda* (#:key tests? #:allow-other-keys)
         (when tests?
           (invoke "ctest" "--exclude-regex" "..."))
         #t)))))

Hope that helps,

Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]