unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 45948-done@debbugs.gnu.org
Subject: bug#45948: [PATCH 0/5] Improvements to the Automake SRFI 64 test driver.
Date: Sun, 31 Jan 2021 22:44:15 -0500	[thread overview]
Message-ID: <87lfc8sb8w.fsf@gmail.com> (raw)
In-Reply-To: <87eei2p0qu.fsf_-_@gnu.org> ("Ludovic Courtès"'s message of "Sat, 30 Jan 2021 22:34:49 +0100")

Hello,

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:

--8<---------------cut here---------------start------------->8---
$ time make check TESTS=tests/packages.scm VERBOSE=1
SCM_LOG_DRIVER_FLAGS="--brief=no"

time make check TESTS=tests/packages.scm VERBOSE=1 SCM_LOG_DRIVER_FLAGS="--brief=no"
[...]
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
============================================================================
Testsuite summary for GNU Guix UNKNOWN
============================================================================
# TOTAL: 100
# PASS:  100
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
[...]
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=tests/packages.scm VERBOSE=1 SCM_LOG_DRIVER_FLAGS="--brief=no --select='bag->derivation' --errors-only=yes"
[...]
PASS: tests/packages.scm - bag->derivation
PASS: tests/packages.scm - bag->derivation, cross-compilation
============================================================================
Testsuite summary for GNU Guix UNKNOWN
============================================================================
# TOTAL: 100
# PASS:  2
# SKIP:  98
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
[...]
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=tests/packages.scm SCM_LOG_DRIVER_FLAGS="--select='fold-available-packages with/without cache'"
[...]
PASS: tests/packages.scm - fold-available-packages with/without cache
============================================================================
Testsuite summary for GNU Guix UNKNOWN
============================================================================
# TOTAL: 100
# PASS:  1
# SKIP:  99
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
[...]
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’s 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 “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).

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

Maxim




  reply	other threads:[~2021-02-01  3:45 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       ` Maxim Cournoyer [this message]
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
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=87lfc8sb8w.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=45948-done@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /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).