;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; 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 (tests offload) #:use-module (guix scripts offload) #:use-module (srfi srfi-64)) (test-begin "offload") (define-syntax-rule (expose-internal-definitions s1 s2 ...) (begin (define s1 (@@ (guix scripts offload) s1)) (define s2 (@@ (guix scripts offload) s2)) ...)) (expose-internal-definitions machine-matches? build-requirements-system build-requirements-features build-machine-system build-machine-systems %build-machine-system %build-machine-systems build-machine-features) (define (deprecated-build-machine system) (build-machine (name "m1") (user "dummy") (host-key "some-key") (system system))) (define (new-build-machine systems) (build-machine (name "m1") (user "dummy") (host-key "some-key") (systems systems))) ;;; Test that deprecated build-machine definitions still work. (test-assert (machine-matches? (deprecated-build-machine "i686-linux") (build-requirements (system "i686-linux")))) (test-assert (machine-matches? (new-build-machine '("i686-linux")) (build-requirements (system "i686-linux")))) ;;; A build machine can act as more than one system type, thanks to QEMU ;;; emulation. (test-assert (machine-matches? (new-build-machine '("armhf-linux" "aarch64-linux" "i686-linux" "x86_64-linux")) (build-requirements (system "armhf-linux")))) 2024-12-09tests: Adjust for new return value of ‘start-service’....In Shepherd 1.0, the “running value” of processes is no longer a plain integer; instead, it is a (process …) sexp. This commit adjusts tests to this change in a way that works both for 1.0 and for previous versions. * gnu/tests/databases.scm (run-memcached-test) (run-mysql-test): Don’t expect PID to be a number. * gnu/tests/docker.scm (run-docker-test) (run-docker-system-test, run-oci-container-test): Likewise. * gnu/tests/guix.scm (run-guix-build-coordinator-test) (run-guix-data-service-test, run-nar-herder-test) (run-bffe-test): Likewise. * gnu/tests/ldap.scm (run-ldap-test): Likewise. * gnu/tests/monitoring.scm (run-prometheus-node-exporter-server-test): Likewise. * gnu/tests/virtualization.scm (run-libvirt-test) (run-qemu-guest-agent-test, run-childhurd-test): Likewise. * gnu/tests/web.scm (run-webserver-test, run-php-fpm-test) (run-hpcguix-web-server-test, run-patchwork-test) (run-agate-test): Likewise * gnu/tests/ssh.scm (run-ssh-test): Accept a number, an ‘inetd-service’ sexp, or a ‘process’ sexp. Change-Id: I8c7a37a981f0788780fbc33752a38e7f9a026437 Ludovic Courtès 2024-08-04services: containerd: Provision separately from docker service....containerd can operate independently without relying on Docker for its configuration. * gnu/services/docker.scm (docker-configuration): Deprecate containerd field. (containerd-configuration, containerd-service-type): New variables. (docker-shepherd-service): Use containerd-configuration. Delete duplicated variable binding. Allow to configure environment variables. (docker-service-type): Delete extension with containerd-service-type. * gnu/tests/docker.scm (%docker-os, %oci-os): Add containerd service. (run-docker-test, run-docker-system-test, run-oci-container-test): Run containerd service. * doc/guix.texi (Miscellaneous Services): Document containerd-service-type. Change-Id: Ife0924e50a3e0aa2302d6592dae51ed894600004 Oleg Pykhalov 2024-05-25gnu: Add tests for oci-container-service-type....* gnu/tests/docker.scm (run-oci-container-test): New variable; (%test-oci-container): new variable. Change-Id: Idefc3840bdc6e0ed4264e8f27373cd9a670f87a0 Signed-off-by: Ludovic Courtès <ludo@gnu.org> Giacomo Leidi 2024-01-08tests: docker-system: Increase image size....* gnu/tests/docker.scm (run-docker-system-test)[vm]: Increase 'disk-image-size'. Change-Id: If88588d8981efdfdc539460900f1cbb9a663f9cb Oleg Pykhalov