unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 45948-done@debbugs.gnu.org
Subject: [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver.
Date: Mon, 01 Feb 2021 23:18:27 +0100	[thread overview]
Message-ID: <87czxjh1os.fsf@inria.fr> (raw)
In-Reply-To: <20210118061853.26808-1-maxim.cournoyer@gmail.com>

Hello!

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>> I never felt the need for this since most individual files run quickly
>> enough (and those that don’t should be optimized…), but it can be
>> useful.
>
> What triggered it for me was trying to iterate using tests added to the
> tests/packages.scm test module:

[...]

> 1.6 s; better than 46 s!

Quite a difference, indeed!

Some tests, like ‘tests/store.scm’, invoke the GC (via ‘delete-paths’
calls in particular), and this is a bad idea because it takes ages.
What I meant by “should be optimized” is that these tests should be
tweaked to avoid invoking the GC as much as possible.

That’s not the case of ‘tests/packages.scm’ though.  Which gives me an
idea: what would it take to modify the test driver so it can print the
time spent in each test?  :-)

That would probably prove helpful to optimize core Guix.

In many cases, I also run the one test I’m interested in through Geiser,
which gives an optimally fast feedback loop.

> We can also check the time the suspected slow test took:
>
> $ time make check TESTS=tests/packages.scm SCM_LOG_DRIVER_FLAGS="--select='fold-available-packages with/without cache'"
> [...]
> PASS: tests/packages.scm - fold-available-packages with/without cache

Ah ha!  Turns out a large part of the time was due to the O(n²) behavior
of the various list operations (the list of packages is big enough!).
Fixed in 73744725dd0a65cddaa9251f104f17ca27756479.

>>> +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 “The underlying test driver (located at
>> @file{build-aux/test-driver.scm}) also allows”.
>
> 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).

Agreed.  It just seemed to me that we were mentioning three new
concepts/tools in passing: SRFI-64, Automake, and test drivers.

> I've now pushed this series to master; thank you for the review!

Thank you!

Ludo’.




  parent reply	other threads:[~2021-02-01 22:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  6:18 [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver Maxim Cournoyer
2021-01-18  6:24 ` [bug#45948] [PATCH 1/5] build: test-driver.scm Make output redirection optional Maxim Cournoyer
2021-01-18  6:24   ` [bug#45948] [PATCH 2/5] build: test-driver.scm: Define the --test-name option as required Maxim Cournoyer
2021-01-18 14:37     ` [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver Maxim Cournoyer
2021-01-18  6:24   ` [bug#45948] [PATCH 3/5] build: test-driver.scm: Enable colored test results by default Maxim Cournoyer
2021-01-30 21:39     ` [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver Ludovic Courtès
2021-02-01  2:47       ` Maxim Cournoyer
2021-01-18  6:24   ` [bug#45948] [PATCH 4/5] build: test-driver.scm: Add test cases filtering options Maxim Cournoyer
2021-01-18 14:38     ` [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver Maxim Cournoyer
2021-01-18  6:25   ` [bug#45948] [PATCH 4/5] build: test-driver.scm: Provide the ability to filter on test case names Maxim Cournoyer
2021-01-30 21:34     ` [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver Ludovic Courtès
2021-02-01  3:44       ` bug#45948: " Maxim Cournoyer
2021-01-18  6:25   ` [bug#45948] [PATCH 5/5] build: test-driver.scm: Add a new '--errors-only' option Maxim Cournoyer
2021-01-30 21:32   ` [bug#45948] [PATCH 0/5] Improvements to the Automake SRFI 64 test driver Ludovic Courtès
2021-02-01 22:18 ` Ludovic Courtès [this message]
2021-02-02  5:47   ` Maxim Cournoyer
2021-02-02  8:36     ` zimoun
2021-02-02 12:52       ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czxjh1os.fsf@inria.fr \
    --to=ludo@gnu.org \
    --cc=45948-done@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).