Allow skipping processing system tests
Generating system test derivations are difficult, since you generally need to do potentially expensive builds for the system you're generating the system tests for. You might not want to disable grafts for instance because you might be trying to test whatever the test is testing in the context of grafts being enabled. I'm looking at skipping the system tests on data.guix.gnu.org, because they're not used and quite expensive to compute.
This commit is contained in:
parent
9e9fc1ba04
commit
3ba8418656
5 changed files with 64 additions and 18 deletions
|
|
@ -38,6 +38,30 @@
|
|||
;; Make stack traces more useful
|
||||
(setenv "COLUMNS" "256")
|
||||
|
||||
(match (command-line)
|
||||
((name job)
|
||||
(process-load-new-guix-revision-job job)))
|
||||
(define %options
|
||||
(list (option '("skip-system-tests") #f #f
|
||||
(lambda (opt name _ result)
|
||||
(alist-cons 'skip-system-tests #t result)))))
|
||||
|
||||
(define %default-options '())
|
||||
|
||||
(define (parse-options args)
|
||||
(args-fold
|
||||
args %options
|
||||
(lambda (opt name arg result)
|
||||
(error "unrecognized option" name))
|
||||
(lambda (arg result)
|
||||
(alist-cons
|
||||
'arguments
|
||||
(cons arg
|
||||
(or (assoc-ref result 'arguments)
|
||||
'()))
|
||||
(alist-delete 'arguments result)))
|
||||
%default-options))
|
||||
|
||||
(let ((opts (parse-options (cdr (program-arguments)))))
|
||||
(match (assq-ref opts 'arguments)
|
||||
((job)
|
||||
(process-load-new-guix-revision-job
|
||||
job
|
||||
#:skip-system-tests? (assq-ref opts 'skip-system-tests)))))
|
||||
|
|
|
|||
|
|
@ -41,7 +41,10 @@
|
|||
(lambda (opt name arg result)
|
||||
(alist-cons 'latest-branch-revision-max-processes
|
||||
(string->number arg)
|
||||
result)))))
|
||||
result)))
|
||||
(option '("skip-system-tests") #f #f
|
||||
(lambda (opt name _ result)
|
||||
(alist-cons 'skip-system-tests #t result)))))
|
||||
|
||||
(define %default-options
|
||||
;; Alist of default option values
|
||||
|
|
@ -70,4 +73,6 @@
|
|||
#:max-processes (assq-ref opts 'max-processes)
|
||||
#:latest-branch-revision-max-processes
|
||||
(or (assq-ref opts 'latest-branch-revision-max-processes)
|
||||
(* 2 (assq-ref opts 'max-processes)))))))
|
||||
(* 2 (assq-ref opts 'max-processes)))
|
||||
#:skip-system-tests?
|
||||
(assq-ref opts 'skip-system-tests)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue