From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0HBDJkp5F2CjOAAA0tVLHw (envelope-from ) for ; Mon, 01 Feb 2021 03:45:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aAEkIkp5F2DJdQAA1q6Kng (envelope-from ) for ; Mon, 01 Feb 2021 03:45:14 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 092249404E8 for ; Mon, 1 Feb 2021 03:45:14 +0000 (UTC) Received: from localhost ([::1]:43930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l6Q9I-0008JF-Vj for larch@yhetil.org; Sun, 31 Jan 2021 22:45:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l6Q98-0008Fs-Oj for guix-patches@gnu.org; Sun, 31 Jan 2021 22:45:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46901) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l6Q98-0002S2-Gj for guix-patches@gnu.org; Sun, 31 Jan 2021 22:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l6Q98-0000vI-FX for guix-patches@gnu.org; Sun, 31 Jan 2021 22:45:02 -0500 Subject: bug#45948: [PATCH 0/5] Improvements to the Automake SRFI 64 test driver. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Mon, 01 Feb 2021 03:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 45948 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Mail-Followup-To: 45948@debbugs.gnu.org, maxim.cournoyer@gmail.com, maxim.cournoyer@gmail.com Received: via spool by 45948-done@debbugs.gnu.org id=D45948.16121510653474 (code D ref 45948); Mon, 01 Feb 2021 03:45:02 +0000 Received: (at 45948-done) by debbugs.gnu.org; 1 Feb 2021 03:44:25 +0000 Received: from localhost ([127.0.0.1]:58444 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Q8X-0000tv-7W for submit@debbugs.gnu.org; Sun, 31 Jan 2021 22:44:25 -0500 Received: from mail-qk1-f177.google.com ([209.85.222.177]:41607) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l6Q8V-0000tc-8V for 45948-done@debbugs.gnu.org; Sun, 31 Jan 2021 22:44:23 -0500 Received: by mail-qk1-f177.google.com with SMTP id n15so15028780qkh.8 for <45948-done@debbugs.gnu.org>; Sun, 31 Jan 2021 19:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=55Bc7IBinpJTRWNoCoFxHL2ZkufaNeFGzxg5C3kE4SA=; b=ExmLePh7H2S0rfRrQl/VVcsxYn34XQNUyN4S/DAuQdsOgtWii8ZLp8+qGhPQnKDVth BDOYDRD0oKoVg+I9yRuLGCfPRtPoLQtZO2Rv0Zt42LY2rmrPpDUfatXgSQeDZ1VOdijZ /s/2gsJk8b72r1BPR1c5X848FQ3bRIjzSsuo9d+bJOzFzLkiYipi8Chk4JRsx5RJT2E6 1XnKx3GOtUxuOaF0R2d6uTi7jUhbWkXncktlygYylbDkw09mbYYSMaAZEaBVqlcKuhbI bVO3YjW0Qtk6QETYgcloen16IPzGZgLcYHo7GXSQMB0QlrafANbB9jDOdbVUmztsV0jJ aZWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=55Bc7IBinpJTRWNoCoFxHL2ZkufaNeFGzxg5C3kE4SA=; b=iO1E20tWif9Zt7/29su4ubZss5Puu2xcEgwk2Psv8m+LUcrHws3TwVc8EkhqlQtEy7 Yd90XDLEOkEyuQQdRdQYV80Ui1c4BesGR+fWeOedxZ3Z8QlO1m+tvc4Vq2W4NmRYOWrA FvpBk0Z4OCkDmA2C42YnqVi2kTJXQ5/LqbEVunICSHkSbYRlALkiw7PRaE/GFjrGwJeU vRFeLhSUW7I5i2W1pf+llsiMZkoj//6D3G7D8HdWxRmr9+2/Q9kIblk1x3Ir57kpENQ6 KdUilqkQ5nb58UQM8SG1ovVMWhJr8eSG5jgadG1oD6kqhfE4Ajb/U6bWFN3DbWzFgHn7 Vzpg== X-Gm-Message-State: AOAM532TO4vJzUs7ZriR1BTMm73RqJaElENVnUkw6XVFMF/LzhrNSgzc udU1PfgbX3laRQluYvwt8C9eGkfAvQc= X-Google-Smtp-Source: ABdhPJzpcanGF2O3/cxpaFOWASNcupLCFsQL8NnhrgXN7dfiC2Nsh6zYH4fxMuz48MB/AFFP7RiTVA== X-Received: by 2002:a37:644e:: with SMTP id y75mr14337752qkb.134.1612151057464; Sun, 31 Jan 2021 19:44:17 -0800 (PST) Received: from hurd (dsl-205-236-230-168.b2b2c.ca. [205.236.230.168]) by smtp.gmail.com with ESMTPSA id q18sm5520844qtr.74.2021.01.31.19.44.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Jan 2021 19:44:16 -0800 (PST) From: Maxim Cournoyer References: <20210118062501.27022-1-maxim.cournoyer@gmail.com> <20210118062501.27022-5-maxim.cournoyer@gmail.com> <87eei2p0qu.fsf_-_@gnu.org> Date: Sun, 31 Jan 2021 22:44:15 -0500 In-Reply-To: <87eei2p0qu.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 30 Jan 2021 22:34:49 +0100") Message-ID: <87lfc8sb8w.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45948-done@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.26 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20161025 header.b=ExmLePh7; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 092249404E8 X-Spam-Score: -1.26 X-Migadu-Scanner: scn0.migadu.com X-TUID: q8CSIVxKIdBA Hello, Ludovic Court=C3=A8s writes: [...] > I never felt the need for this since most individual files run quickly > enough (and those that don=E2=80=99t should be optimized=E2=80=A6), but i= t can be > useful. What triggered it for me was trying to iterate using tests added to the tests/packages.scm test module: --8<---------------cut here---------------start------------->8--- $ time make check TESTS=3Dtests/packages.scm VERBOSE=3D1 SCM_LOG_DRIVER_FLAGS=3D"--brief=3Dno" time make check TESTS=3Dtests/packages.scm VERBOSE=3D1 SCM_LOG_DRIVER_FLAGS= =3D"--brief=3Dno" [...] PASS: tests/packages.scm - package-patched-vulnerabilities PASS: tests/packages.scm - fold-packages PASS: tests/packages.scm - fold-packages, hidden package [... time passes ...] PASS: tests/packages.scm - fold-available-packages with/without cache [...] PASS: tests/packages.scm - find-package-locations with cache PASS: tests/packages.scm - specification->location =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Testsuite summary for GNU Guix UNKNOWN =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # TOTAL: 100 # PASS: 100 # SKIP: 0 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D [...] real 0m46.172s user 1m4.885s sys 0m0.376s --8<---------------cut here---------------end--------------->8--- That's on the fastest machine I have access to (on my vintage desktop, it took nearly 4 minutes). The slowest test seems to be 'fold-available-packages with/without cache'. Now with the new select, one can do: --8<---------------cut here---------------start------------->8--- $ time make check TESTS=3Dtests/packages.scm VERBOSE=3D1 SCM_LOG_DRIVER_FLA= GS=3D"--brief=3Dno --select=3D'bag->derivation' --errors-only=3Dyes" [...] PASS: tests/packages.scm - bag->derivation PASS: tests/packages.scm - bag->derivation, cross-compilation =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Testsuite summary for GNU Guix UNKNOWN =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # TOTAL: 100 # PASS: 2 # SKIP: 98 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D [...] real 0m1.569s user 0m2.382s sys 0m0.154s --8<---------------cut here---------------end--------------->8--- 1.6 s; better than 46 s! We can also check the time the suspected slow test took: $ time make check TESTS=3Dtests/packages.scm SCM_LOG_DRIVER_FLAGS=3D"--sele= ct=3D'fold-available-packages with/without cache'" [...] PASS: tests/packages.scm - fold-available-packages with/without cache =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D Testsuite summary for GNU Guix UNKNOWN =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D # TOTAL: 100 # PASS: 1 # SKIP: 99 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D [...] real 0m36.627s user 0m45.731s sys 0m0.264s So yes, this is the most expensive test of tests/packages.scm. >> +;;; XXX: test-match-all is a syntax, which isn't convenient to use with= a list >> +;;; of test specifiers computed at run time. >> +(define %test-match-all (@@ (srfi srfi-64) %test-match-all)) > > Since this is an internal procedure in Guile that could vanish anytime, > I recommend copying it here (it=E2=80=99s just 9 lines). Done! >> +The underlying SRFI 64 custom Automake test driver used for the 'check' >> +test suite (located at @file{build-aux/test-driver.scm}) also allows > > Maybe shorten to =E2=80=9CThe underlying test driver (located at > @file{build-aux/test-driver.scm}) also allows=E2=80=9D. I see value in explicitly stating what it is, as it took me some effort to be able to answer that question when I started looking at it (the test driver). I've now pushed this series to master; thank you for the review! Maxim