From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id uOyWAHuLmmaKIQEAqHPOHw:P1 (envelope-from ) for ; Fri, 19 Jul 2024 15:51:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id uOyWAHuLmmaKIQEAqHPOHw (envelope-from ) for ; Fri, 19 Jul 2024 17:51:23 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=isWoaf3Y; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721404282; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=cyKuQ7K4T9Od5zL09ABPFPi3Xsx5SiDwk+41NSovA3o=; b=oaFElX5SR3ruuq/SzHjwd1Ux7h7OruhieebmckfEsFXr8iO8Hc9S/czgRLBxZzWQjPAzQ/ IViBzapq+3+wuqr0ctHk0SHXoK/k2ZP/WJbM97p8+BLLxjX8nCsdMIK2FiZ3Et0euHmWQy dW9bHijk4u7MNmc3Ue6r2J5ubASnBlW8GvN4iPRpfonPbQ3AhQ6WISkMQEcty9dhxEFm0b HNt/7YlaA1Lx+1MUoq4yMhGbgH3U3R8e9xz2ZJEr6aFCtTAegwsAy0cQeSsxpTDBwS3q1k svnYKTbwrjdmd0SvcRRfJs08zyZkKhBUEZX4T/Vj1k9EcBQ5RYd2d65XanydDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721404282; a=rsa-sha256; cv=none; b=YLqKBk7mkjAHVuMAEy505bxHchzne9Mrr3Ui/x60JK0zwnYy/hKPNmdfbap6R0zr2X6ffr kWj6hpgdaDt+zBHygUil9Z3AR3NjBruWW0eE/+At3GDBnpdm9kqv9xMiocIEc5+fbXPYj/ 5Pu5fm48GDZnZjQSq/SICDIuFCk2tGN7c1b+cLUPkR7z7EJsTi72u1HaFzNGmZaazzoccf qmnlAJ5O7YWzg8AXXXsOqDvud3urAU/phW7unLJRT6jbin5M6D30ECbzbSlnFOiVVLRf1L d1yoZ3ICNujVprhuVLzauLXlIwVRe0BtgXGQIJNtQllh8uPA/MNd9C0mQTwwlw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=isWoaf3Y; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A33EC32F16 for ; Fri, 19 Jul 2024 17:51:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUpsw-0005kh-Dt; Fri, 19 Jul 2024 11:51:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sUpsv-0005kX-L2 for bug-guix@gnu.org; Fri, 19 Jul 2024 11:51:05 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sUpsv-0006Xf-DC for bug-guix@gnu.org; Fri, 19 Jul 2024 11:51:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUpsr-00021A-KN; Fri, 19 Jul 2024 11:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#72045: [PATCH v2 1/2] gnu: Add system test for Emacs. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, bug-guix@gnu.org Resent-Date: Fri, 19 Jul 2024 15:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72045 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 72045@debbugs.gnu.org Cc: Suhail Singh , andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com X-Debbugs-Original-Xcc: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com Received: via spool by 72045-submit@debbugs.gnu.org id=B72045.17214042317715 (code B ref 72045); Fri, 19 Jul 2024 15:51:01 +0000 Received: (at 72045) by debbugs.gnu.org; 19 Jul 2024 15:50:31 +0000 Received: from localhost ([127.0.0.1]:50222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUpsM-00020N-J7 for submit@debbugs.gnu.org; Fri, 19 Jul 2024 11:50:31 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:60531) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUpsK-000205-KH for 72045@debbugs.gnu.org; Fri, 19 Jul 2024 11:50:29 -0400 Received: by mail-lj1-f196.google.com with SMTP id 38308e7fff4ca-2ee91d9cb71so24558611fa.0 for <72045@debbugs.gnu.org>; Fri, 19 Jul 2024 08:50:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721404163; x=1722008963; darn=debbugs.gnu.org; h=mime-version:cc:to:subject:date:from:message-id:from:to:cc:subject :date:message-id:reply-to; bh=cyKuQ7K4T9Od5zL09ABPFPi3Xsx5SiDwk+41NSovA3o=; b=isWoaf3Yy/sO6LS0QLty3iy02KE0Pgb46BKRCC0RgAjCqrg2LodpfhL4yTR33GLhc7 0ofIL3FhOe4te6ieE0olPiGFEvysMCGnVLMKCZc2e+j0deaD1sQOA4XYuhPvg61aITSS +Ok/3AoIX83sGjd0kCg1+r//TamDQxfGzdeQDjnNtnVZ5JEtC+MySo5N6kvfOaniLNoP Am+KDukcMoccmLLBEZfflE2LcMZKyYNxYVtbK/j7oc7dZTallgSvPZPY9JbNSV8H90Ls umQkL+RX8e9LmARDVuzQXxvCKmELzKSsm1hgFSCCLmhlQ66vYsjrEKbe+IGDPjkKxSv+ U7pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721404163; x=1722008963; h=mime-version:cc:to:subject:date:from:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cyKuQ7K4T9Od5zL09ABPFPi3Xsx5SiDwk+41NSovA3o=; b=E2rsfB5s8BM42U+IshQM0JVaT4yoRqytNULbE5FOq7qIBWuLixbv3Mm1vh/kGLHslV p+SGgJMYXYVtah/8s11Q92QZjYORHOjolSTWzfYamt1qHDqS0/V0DIX4JBWdrdVlYamN QL3gL3e9Za2wFk5aEFDaYcsy/xMqLukpRVULZ0wQ30rm6s+gc/YQyKtTPLLiyGdUSOa+ glwq5UgBiWSccTuANaHBRvvlZ81/7wUlWzjyn+WFAm2xq9FhBEDVEMNDVu0CqAF1UMDr fde0QprOdXWpkDFWEdg9pQvO4cfcCZL+AmB3xcNhdd6krrZUblXr5cac8KijzAX9cpcc uy2A== X-Gm-Message-State: AOJu0YwMICMaFhB+pPhCqOgD9sSab9oMT/UQYiVtuMF4RAHl9SZGSXRO XV8GJ91juVuR3QtfdgmStDvHGli+Di2CNmv4eJGC1NIWdY7/7jyEcs/TiFcY X-Google-Smtp-Source: AGHT+IHDIhtyPI0OD/6QYVYJfASVcaYKjvAcc5hNq+kcrmfIqz5HPRvgSYo+lgzxzhMHhr5qEr34Ww== X-Received: by 2002:a17:906:388f:b0:a77:d773:54e0 with SMTP id a640c23a62f3a-a7a01353a72mr488633266b.68.1721377930637; Fri, 19 Jul 2024 01:32:10 -0700 (PDT) Received: from lumine.fritz.box (85-127-20-124.dsl.dynamic.surfer.at. [85.127.20.124]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a7a33d9f67bsm75265566b.106.2024.07.19.01.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jul 2024 01:32:10 -0700 (PDT) Message-ID: <6c20a4fd1a6225f062b019d79e090399785470ea.1721377800.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Fri, 19 Jul 2024 09:35:34 +0200 MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: A33EC32F16 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -0.31 X-Spam-Score: -0.31 X-TUID: 0XI30U23wNKy * gnu/tests/emacs.scm: New file. --- Hi Guix, this series adds a system test to ensure that Emacs grafts are meaningful. With this, we can make safe decisions as to whether or not place (replacement …) Cheers gnu/tests/emacs.scm | 100 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 gnu/tests/emacs.scm diff --git a/gnu/tests/emacs.scm b/gnu/tests/emacs.scm new file mode 100644 index 0000000000..fba27cefd8 --- /dev/null +++ b/gnu/tests/emacs.scm @@ -0,0 +1,100 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2024 Liliana Marie Prikler +;;; +;;; 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 (gnu tests emacs) + #:use-module (gnu tests) + #:use-module (gnu packages emacs) + #:use-module (gnu packages vim) + #:use-module (gnu services) + #:use-module (gnu system) + #:use-module (gnu system vm) + #:use-module (guix packages) + #:use-module (guix gexp) + #:use-module (srfi srfi-1) + #:export (%test-emacs-native-comp-replacable)) + +(define (run-native-comp-replacable-test old-emacs new-emacs) + (define vm (virtual-machine (marionette-operating-system %simple-os))) + + (define test + (with-imported-modules '((gnu build marionette)) + #~(begin + (use-modules (gnu build marionette) + (srfi srfi-1) + (srfi srfi-64)) + + (define marionette (make-marionette (list #$vm))) + (define (emacs-native-comp-dir emacs) + (marionette-eval + `(begin + (use-modules (ice-9 rdelim) (ice-9 popen)) + (read-line + (open-pipe* + OPEN_READ + ,emacs "--batch" + "--eval=(princ comp-native-version-dir)"))) + marionette)) + (define (emacs-effective-version emacs) + (marionette-eval + `(begin + (use-modules (ice-9 rdelim) (ice-9 popen)) + (read-line + (open-pipe* + OPEN_READ + ,emacs "--batch" + "--eval=(princ (format \"%s.%s\" \ + emacs-major-version emacs-minor-version))"))) + marionette)) + (define old-emacs-bin #$(file-append old-emacs "/bin/emacs")) + (define new-emacs-bin #$(file-append new-emacs "/bin/emacs")) + + (test-runner-current (system-test-runner #$output)) + (test-begin "emacs-native-comp-replacable") + (test-equal "native-comp-dir" + (emacs-native-comp-dir + #$(file-append old-emacs "/bin/emacs")) + (emacs-native-comp-dir + #$(file-append new-emacs "/bin/emacs"))) + (test-assert "old emacs has hierarchical layout" + (file-exists? + (string-append #$new-emacs "/lib/emacs/" + (emacs-effective-version old-emacs-bin) + "/native-lisp/" + (emacs-native-comp-dir old-emacs-bin) + "/preloaded/emacs-lisp/comp.eln"))) + (test-assert "new emacs has hierarchical layout" + (file-exists? + (string-append #$new-emacs "/lib/emacs/" + (emacs-effective-version new-emacs-bin) + "/native-lisp/" + (emacs-native-comp-dir new-emacs-bin) + "/preloaded/emacs-lisp/comp.eln"))) + (test-end)))) + + (gexp->derivation "emacs-native-comp-compatible" test)) + +(define (package-without-replacement pkg) + (package (inherit pkg) (replacement #f))) + +(define %test-emacs-native-comp-replacable + (system-test + (name "emacs-native-comp") + (description "Test whether an emacs replacement (if any) is valid.") + (value (run-native-comp-replacable-test + (package-without-replacement emacs) + emacs)))) base-commit: e3dfed59d39ac60dd2e2b9ef9f4ef63a2a081f41 -- 2.45.2