From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Baines Subject: Re: Package gmsh: best practise with test-suite? Date: Mon, 11 Feb 2019 20:21:30 +0000 Message-ID: <874l9adqk5.fsf@cbaines.net> References: <875ztqdsjt.fsf@cbaines.net> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:47002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtI5B-0006U9-Bq for guix-devel@gnu.org; Mon, 11 Feb 2019 15:21:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtI59-0004jp-OC for guix-devel@gnu.org; Mon, 11 Feb 2019 15:21:36 -0500 Received: from li622-129.members.linode.com ([212.71.249.129]:43134 helo=mira.cbaines.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtI59-0004iC-Eb for guix-devel@gnu.org; Mon, 11 Feb 2019 15:21:35 -0500 In-reply-to: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: zimoun Cc: Guix Devel --=-=-= Content-Type: text/plain zimoun writes: > On Mon, 11 Feb 2019 at 20:38, Christopher Baines wrote: >> zimoun 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlxh2UpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9Xf0mw//bUG+OmSGWUAEcJtJ+6bQoUFfpBgs1SQhFbcYhY5oA2SmezCLLi5NkbvW /38C/hsbBc0lEMFsdd1lBhZ3tA6O1/5U8FCsV+HN0D2+AvGbubNdJBwkQOc9/7ad bCkwUIkYhzWvzfniOvzief7Fe6VFWb7rLwlT/meLwi4ClD82G9FkUmL21b/QwKR5 a3JrOwD7cqHyJ/5Li4ZyGKoLFDw5hSt7cB43/uQdMujmWqMkNc9/6DUqrOehmJIh L/hB23dV5H5ScsRWLrnbzJ8Cd/MIubooD4skLqF75estgwaUYxdP+I2Fv/8efbL/ a0+X6V10PyyZ7p3QrltVTC/JCx0Cd1969tEFLDZWS2NMUKU75XlAaTKOk8DGHoLF 2V+uu3gw/7GMhaNPyMOE9Xlv0CIUW9ZwxjYdSGodt0PKnQnMe2IAXEfTJ0tBw4ZK r0zMXMt056ci7cvkgd9Sa6dJSe6aDuMkZdR3vLJam3hb+7xMNKBLWXg07c8aiLVM 6CRz206IdJeKSKxZgO2mBjJX3BgdWA9XAJoTjanLPSckQJRYDetZeh0m3yMpK0Dh cXtRkVBwS1jIB+WayU9orLmxnyDV/tYpTPaVcc1dTF5EsimFoAsMGLDMiuHLBIB0 cyWFrqi10PSuAh+yEkbAXFJDBI2tLiXnnmLpv29BccI8t7EY+VM= =zARR -----END PGP SIGNATURE----- --=-=-=--