Message ID | 705438b285d013ee05c5ae1d73b1c80aff2aa4fa.1730890007.git.dariqq@posteo.net |
---|---|
State | New |
Headers | show |
Series | [bug#74225] lint: Check for more types of custom 'check phases. | expand |
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
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
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))