unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Proposed environment variable to skip running tests
@ 2018-04-22 15:26 rain1
  2018-04-22 20:09 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: rain1 @ 2018-04-22 15:26 UTC (permalink / raw)
  To: guix-devel

Hello!

I would like to propose an environment variable that can be used to skip 
tests, e.g. export GUIX_SKIP_TESTS=1

This could be implemented by changing line 297 of 
guix/guix/build/gnu-build-system.scm:

(define* (check #:key target (make-flags '()) (tests? (not target))
                 (test-target "check") (parallel-tests? #t)
                 #:allow-other-keys)
   (if (and tests? (not (getenv "GUIX_SKIP_TESTS"))) ;;;;;; HERE
       (zero? (apply system* "make" test-target
                     `(,@(if parallel-tests?
                             `("-j" ,(number->string 
(parallel-job-count)))
                             '())
                       ,@make-flags)))
       (begin
         (format #t "test suite not run~%")
         #t)))

The reason I suggest this is because installing GuixSD with --fallback 
is sometimes necessary (I was getting a lot of 504's errors, so had to 
use fallback) but in that case the subversion and git test suites take 
many hours and perform excessive grinding on hard disk. Allowing users 
the choice to skip tests in a situation like this means we can get 
guixsd installed quickly.

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

* Re: Proposed environment variable to skip running tests
  2018-04-22 15:26 Proposed environment variable to skip running tests rain1
@ 2018-04-22 20:09 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2018-04-22 20:09 UTC (permalink / raw)
  To: rain1; +Cc: guix-devel

Hello,

rain1@airmail.cc skribis:

> I would like to propose an environment variable that can be used to
> skip tests, e.g. export GUIX_SKIP_TESTS=1
>
> This could be implemented by changing line 297 of
> guix/guix/build/gnu-build-system.scm:
>
> (define* (check #:key target (make-flags '()) (tests? (not target))
>                 (test-target "check") (parallel-tests? #t)
>                 #:allow-other-keys)
>   (if (and tests? (not (getenv "GUIX_SKIP_TESTS"))) ;;;;;; HERE

Since builds are performed in an isolated environments with a clearly
defined set of environment variables.  Thus what you define would not
work as-is.

To achieve it, we’d have to, for instance, instruct guix-daemon to
special-case ‘GUIX_SKIP_TESTS’ and let it through in the build
environment.

Even though I can imagine the pain you feel while rebuilding everything
on GNU/Hurd, I’m reluctant to such changes.  I would suggest using
tricks to avoid full rebuilds in your case as much as possible.  (If you
provide concrete examples of rebuilds you’d like to avoid, I can perhaps
illustrate what “tricks” you could use.  :-))

Thanks,
Ludo’.

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

end of thread, other threads:[~2018-04-22 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-22 15:26 Proposed environment variable to skip running tests rain1
2018-04-22 20:09 ` Ludovic Courtès

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).