all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#74225] [PATCH] lint: Check for more types of custom 'check phases.
@ 2024-11-06 10:46 Dariqq
  2024-11-16  8:07 ` Simon Tournier
  2024-12-18 10:45 ` bug#74225: " Ludovic Courtès
  0 siblings, 2 replies; 4+ messages in thread
From: Dariqq @ 2024-11-06 10:46 UTC (permalink / raw)
  To: 74225
  Cc: Dariqq, Christopher Baines, Josselin Poiret, Ludovic Courtès,
	Mathieu Othacehe, Simon Tournier, Tobias Geerinckx-Rice

* guix/lint.scm (check-optional-tests): Also check for add-before and
add-after when adding custom 'check phases.

Change-Id: Idc959f90d7e9aa9d5001f34e00f88b41aa20fb2a
---
Hi,
Stumbled upon a test failure in u-boot-utils today which is not using #:tests? for its custom 'check phase but not being detected by the linter. Reason is that the 'check phase is added after 'install and not just replacing it.

This little patch makes it it possible to detect it and adds 38 more warnings.


 guix/lint.scm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/guix/lint.scm b/guix/lint.scm
index 8c6c20c723..4ba728da33 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -1433,6 +1433,10 @@ (define (check-optional-tests package)
     (match delta
       (`(replace 'check ,expression)
        (check-check-procedure expression))
+      (`(add-after ,_ 'check ,expression)
+       (check-check-procedure expression))
+      (`(add-before ,_ 'check ,expression)
+       (check-check-procedure expression))
       (_ '())))
   (define (check-phases-deltas deltas)
     (append-map check-phases-delta deltas))

base-commit: 0c1a6db8094dc6b20762eceae369daae545fc5e4
-- 
2.46.0





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#74225] [PATCH] lint: Check for more types of custom 'check phases.
  2024-11-06 10:46 [bug#74225] [PATCH] lint: Check for more types of custom 'check phases Dariqq
@ 2024-11-16  8:07 ` Simon Tournier
  2024-11-19 14:32   ` Dariqq
  2024-12-18 10:45 ` bug#74225: " Ludovic Courtès
  1 sibling, 1 reply; 4+ messages in thread
From: Simon Tournier @ 2024-11-16  8:07 UTC (permalink / raw)
  To: Dariqq, 74225
  Cc: Josselin Poiret, Mathieu Othacehe, Ludovic Courtès,
	Tobias Geerinckx-Rice, Dariqq, Christopher Baines

Hi,

On Wed, 06 Nov 2024 at 10:46, Dariqq <dariqq@posteo.net> wrote:

> diff --git a/guix/lint.scm b/guix/lint.scm
> index 8c6c20c723..4ba728da33 100644
> --- a/guix/lint.scm
> +++ b/guix/lint.scm
> @@ -1433,6 +1433,10 @@ (define (check-optional-tests package)
>      (match delta
>        (`(replace 'check ,expression)
>         (check-check-procedure expression))
> +      (`(add-after ,_ 'check ,expression)
> +       (check-check-procedure expression))
> +      (`(add-before ,_ 'check ,expression)
> +       (check-check-procedure expression))

Please note that 'check here is up to packagers.  They might pick the
symbol 'tests or 'run-check or 'adjusted-tests or 'custom-tests or
whatever else.  To my knowledge, there is no real convention.

Well, I do not know.

Cheers,
simon




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#74225] [PATCH] lint: Check for more types of custom 'check phases.
  2024-11-16  8:07 ` Simon Tournier
@ 2024-11-19 14:32   ` Dariqq
  0 siblings, 0 replies; 4+ messages in thread
From: Dariqq @ 2024-11-19 14:32 UTC (permalink / raw)
  To: Simon Tournier, 74225
  Cc: Christopher Baines, Josselin Poiret, Tobias Geerinckx-Rice,
	Ludovic Courtès, Mathieu Othacehe

Hi Simon,

On 16.11.24 09:07, Simon Tournier wrote:
> Hi,
> 
> On Wed, 06 Nov 2024 at 10:46, Dariqq <dariqq@posteo.net> wrote:
> 
>> diff --git a/guix/lint.scm b/guix/lint.scm
>> index 8c6c20c723..4ba728da33 100644
>> --- a/guix/lint.scm
>> +++ b/guix/lint.scm
>> @@ -1433,6 +1433,10 @@ (define (check-optional-tests package)
>>       (match delta
>>         (`(replace 'check ,expression)
>>          (check-check-procedure expression))
>> +      (`(add-after ,_ 'check ,expression)
>> +       (check-check-procedure expression))
>> +      (`(add-before ,_ 'check ,expression)
>> +       (check-check-procedure expression))
> 
> Please note that 'check here is up to packagers.  They might pick the
> symbol 'tests or 'run-check or 'adjusted-tests or 'custom-tests or
> whatever else.  To my knowledge, there is no real convention.
> 

Of course this is not perfect because the name of the phase to run the 
tests is arbitrary but this (simple) change catches this problem in 38 
packages currently in guix (and 'check seems to be convention in guix)

This came out of a frustration with failing tests in u-boot-tools which 
implements a custom 'check phase after 'install which before 
e6ec657c497cdfe9130b7bf5bdfb717a823bf02b were unskipable but passed the 
lint check.



> Well, I do not know.
> 
> Cheers,
> simon

Dariqq




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#74225: [PATCH] lint: Check for more types of custom 'check phases.
  2024-11-06 10:46 [bug#74225] [PATCH] lint: Check for more types of custom 'check phases Dariqq
  2024-11-16  8:07 ` Simon Tournier
@ 2024-12-18 10:45 ` Ludovic Courtès
  1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2024-12-18 10:45 UTC (permalink / raw)
  To: Dariqq
  Cc: Josselin Poiret, Simon Tournier, Mathieu Othacehe,
	Tobias Geerinckx-Rice, Christopher Baines, 74225-done

Dariqq <dariqq@posteo.net> skribis:

> * guix/lint.scm (check-optional-tests): Also check for add-before and
> add-after when adding custom 'check phases.
>
> Change-Id: Idc959f90d7e9aa9d5001f34e00f88b41aa20fb2a

Applied, thanks!




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-12-18 10:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-06 10:46 [bug#74225] [PATCH] lint: Check for more types of custom 'check phases Dariqq
2024-11-16  8:07 ` Simon Tournier
2024-11-19 14:32   ` Dariqq
2024-12-18 10:45 ` bug#74225: " Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.