;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (run-system-tests) #:use-module (gnu tests base) #:use-module (guix store) #:use-module (guix monads) #:use-module (guix derivations) #:use-module (guix ui) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) #:export (run-system-tests)) (define (built-derivations* drv) (lambda (store) (guard (c ((nix-protocol-error? c) (values #f store))) (values (build-derivations store drv) store)))) (define (filterm mproc lst) ;XXX: move to (guix monads) (with-monad %store-monad (>>= (foldm %store-monad (lambda (item result) (mlet %store-monad ((keep? (mproc item))) (return (if keep? (cons item result) result)))) '() lst) (lift1 reverse %store-monad)))) (define %system-tests (list %test-basic-os)) (define (run-system-tests . args) (with-store store (run-with-store store (mlet* %store-monad ((drv (sequence %store-monad %system-tests)) (out -> (map derivation->output-path drv))) (mbegin %store-monad (show-what-to-build* drv) (set-build-options* #:keep-going? #t #:keep-failed? #t) (built-derivations* drv) (mlet %store-monad ((valid (filterm (store-lift valid-path?) out)) (failed (filterm (store-lift (negate valid-path?)) out))) (format #t "TOTAL: ~a\n" (length drv)) (for-each (lambda (item) (format #t "PASS: ~a~%" item)) valid) (for-each (lambda (item) (format #t "FAIL: ~a~%" item)) failed) (exit (null? failed)))))))) vic Courtès 2022-05-26cuirass: Fork inferior processes before creating threads....Works around <https://issues.guix.gnu.org/55441#12>. Start from commit bd86bbd300474204878e927f6cd3f0defa1662a5, 'open-inferior' uses 'primitive-fork' instead of 'open-pipe*'. As a result, child process could potentially hang before calling 'execl' due to undefined behavior when forking a multi-threaded process. * build-aux/cuirass/evaluate.scm <top level>: Call 'open-inferior' before 'n-par-for-each'. Ludovic Courtès 2022-05-20cuirass: Close each inferior upon completion....* build-aux/cuirass/evaluate.scm <top level>: Add 'close-inferior' call. Ludovic Courtès 2021-12-22tests: Move keys into ./tests/keys/ and add a third ed25519 key....The third key will be used in an upcoming commit. Rename public keys to .pub. * guix/tests/gnupg.scm (%ed25519-3-public-key-file): New variable. (%ed25519-3-secret-key-file): New variable. (%ed25519-2-public-key-file): Renamed from %ed25519bis-public-key-file. (%ed25519-2-secret-key-file): Renamed from %ed25519bis-secret-key-file. * tests/keys/ed25519-3.key: New file. * tests/keys/ed25519-3.sec: New file. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org> Attila Lendvai 2021-11-27build-self: Help users to submit useful bug reports....* build-aux/build-self.scm (build): Request the ‘COMPLETE output’. Tobias Geerinckx-Rice 2021-10-17maint: Factorize po xref translation....This ensures we use the same method in "make" as in "guix/self.scm". * Makefile.am: Build guix/build/po.scm. * build-aux/convert-xref.scm: New file. * doc/local.mk (xref_command): Use it. * guix/self.scm (translate-cross-references): Move it... * guix/build/po.scm: Parse comments and flags separately to find fuzzy flags. (translate-cross-references): ...here. (parse-tree->assoc): Ignore fuzzy entries. Julien Lepiller