GNU bug report logs - #46216
[PATCH] Remove duplication in tests/publish.scm

Previous Next

Package: guix-patches;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Sun, 31 Jan 2021 18:47:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 46216 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46216; Package guix-patches. (Sun, 31 Jan 2021 18:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Maxime Devos <maximedevos <at> telenet.be>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 31 Jan 2021 18:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: guix-patches <at> gnu.org
Subject: [PATCH] Remove duplication in tests/publish.scm
Date: Sun, 31 Jan 2021 19:46:02 +0100
[Message part 1 (text/plain, inline)]
Hi Guix!

In https://issues.guix.gnu.org/46214, I proposed
a draft patch for adding a ‘hook’ mechanism to
guix publish.  Now I would like to write some tests.

However, it seems the following construct is duplicated
for many tests:

   (call-with-new-thread
    (lambda ()
      (guix-publish "--port=PORT" et cetera)))
			
This patch series introduces some abstraction.
Currently, there is only one patch yet, but more
will follow.

"make check TESTS=tests/publish.scm" still succeeds.
(Guix version: 23a5dcce1d893b8f5c5301ae3c1af863776ed3cf
with some not-yet-upstreamed changes).

Maxime
-- 
Maxime Devos <maximedevos <at> telenet.be>
PGP Key: C1F3 3EE2 0C52 8FDB 7DD7  011F 49E3 EE22 1917 25EE
Freenode handle: mdevos
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46216; Package guix-patches. (Sun, 31 Jan 2021 18:53:02 GMT) Full text and rfc822 format available.

Message #8 received at 46216 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: 46216 <at> debbugs.gnu.org, maximedevos <at> telenet.be
Subject: Re: [PATCH] Remove duplication in tests/publish.scm
Date: Sun, 31 Jan 2021 19:52:18 +0100
[Message part 1 (text/plain, inline)]
Oops, I forgot to attach the patch.
[0001-tests-publish-lessen-code-duplication.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46216; Package guix-patches. (Sun, 31 Jan 2021 20:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 46216 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: 46216 <at> debbugs.gnu.org
Subject: [PATCH] Remove duplication in tests/publish.scm
Date: Sun, 31 Jan 2021 21:04:39 +0100
[Message part 1 (text/plain, inline)]
This is the second patch in the series.  Description
from commit message:

* tests/publish.scm
  (call-with-guix-publish, with-guix-publish): introduce
  combination of spawn-guix-publish and wait-until-ready,
  and adjust tests to use the macro.

Maxime
[0002-tests-publish-remove-duplicated-use-of-wait-until-re.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46216; Package guix-patches. (Sun, 31 Jan 2021 22:03:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: guix-patches <at> gnu.org
Subject: Re: [PATCH] Remove duplication in tests/publish.scm
Date: Sun, 31 Jan 2021 23:01:48 +0100
[Message part 1 (text/plain, inline)]
This is the third patch in the series.  Description
from patch:

  This way, there's no risk of accidentally reusing a
  port number used by another test.  This changes the
  workings of the "/*.narinfo for a compressed file" test
  a little, by not reusing the port from the test
  "/*.narinfo with compression".

  * tests/publish.scm
    (*latest-port*, call-with-guix-publish, with-guix-publish):
    automatically assign port numbers, and change tests to
    use the new calling rules.


[0003-tests-publish-automatically-keep-track-of-port-numbe.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46216; Package guix-patches. (Sun, 31 Jan 2021 22:12:02 GMT) Full text and rfc822 format available.

Message #17 received at 46216 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: 46216 <at> debbugs.gnu.org
Subject: Fwd: Re: [PATCH] Remove duplication in tests/publish.scm
Date: Sun, 31 Jan 2021 23:10:57 +0100
[Message part 1 (text/plain, inline)]
I accidentally sent this to guix-patches instead of
46216 <at> debbugs.gnu.org.

-------- Forwarded Message --------
From: Maxime Devos <maximedevos <at> telenet.be>
Reply-To: 46216 <at> debbugs.gnu.org
To: guix-patches <at> gnu.org
Subject: Re: [PATCH] Remove duplication in tests/publish.scm
Date: Sun, 31 Jan 2021 23:01:48 +0100

This is the third patch in the series.  Description
from patch:

  This way, there's no risk of accidentally reusing a
  port number used by another test.  This changes the
  workings of the "/*.narinfo for a compressed file" test
  a little, by not reusing the port from the test
  "/*.narinfo with compression".

  * tests/publish.scm
    (*latest-port*, call-with-guix-publish, with-guix-publish):
    automatically assign port numbers, and change tests to
    use the new calling rules.


[0003-tests-publish-automatically-keep-track-of-port-numbe.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#46216; Package guix-patches. (Mon, 01 Feb 2021 14:06:01 GMT) Full text and rfc822 format available.

Message #20 received at 46216 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: 46216 <at> debbugs.gnu.org
Subject: [PATCH] Remove duplication in tests/publish.scm
Date: Mon, 01 Feb 2021 15:04:16 +0100
[Message part 1 (text/plain, inline)]
This is the fourth patch in the series.
It removes any explicit port numbers in the test.
This may be useful for preventing some potential
future problems with parallel "make check".

Description from the commit message:

> Subject: [PATCH 4/4] tests: publish: don't bind the test server to a port.
>
> This way, multiple instances of 'make check TESTS=tests/publish.scm'
> can be run in parallel.  Also, there's no risk of the ports used
> in this test conflicting with ports assigned to system services
> anymore.  This also prevents any potential future conflicts
> with ports used by other tests that would lead to nondeterministic
> test failures when parallel tests are enabled.

[0004-tests-publish-don-t-bind-the-test-server-to-a-port.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 3 years and 79 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.