diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/guix-data-service-process-job.in | 30 | ||||
-rw-r--r-- | scripts/guix-data-service-process-jobs.in | 9 |
2 files changed, 34 insertions, 5 deletions
diff --git a/scripts/guix-data-service-process-job.in b/scripts/guix-data-service-process-job.in index e67e4e2..c6d06c6 100644 --- a/scripts/guix-data-service-process-job.in +++ b/scripts/guix-data-service-process-job.in @@ -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))))) diff --git a/scripts/guix-data-service-process-jobs.in b/scripts/guix-data-service-process-jobs.in index 4a7af52..fb0385e 100644 --- a/scripts/guix-data-service-process-jobs.in +++ b/scripts/guix-data-service-process-jobs.in @@ -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))))) |