From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id cG/AIw+35V5mGwAA0tVLHw (envelope-from ) for ; Sun, 14 Jun 2020 05:35:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mMZ8Hw+35V4eXQAAbx9fmQ (envelope-from ) for ; Sun, 14 Jun 2020 05:35:11 +0000 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 0A57094053C for ; Sun, 14 Jun 2020 05:35:10 +0000 (UTC) Received: from localhost ([::1]:58622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jkLIS-0007Kk-H1 for larch@yhetil.org; Sun, 14 Jun 2020 01:35:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53848) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkLIM-0007KQ-5b for guix-patches@gnu.org; Sun, 14 Jun 2020 01:35:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkLIL-0005q6-Sg for guix-patches@gnu.org; Sun, 14 Jun 2020 01:35:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jkLIL-0007Lx-Ql for guix-patches@gnu.org; Sun, 14 Jun 2020 01:35:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41845] [PATCH] tests: lint: Add origin patch file name test cases. Resent-From: Chris Marusich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 14 Jun 2020 05:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 41845@debbugs.gnu.org X-Debbugs-Original-Cc: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159211287028205 (code B ref -1); Sun, 14 Jun 2020 05:35:01 +0000 Received: (at submit) by debbugs.gnu.org; 14 Jun 2020 05:34:30 +0000 Received: from localhost ([127.0.0.1]:42735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkLHq-0007Kr-4b for submit@debbugs.gnu.org; Sun, 14 Jun 2020 01:34:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:60896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jkLHo-0007Kj-MM for submit@debbugs.gnu.org; Sun, 14 Jun 2020 01:34:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53444) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jkLHo-0007Ib-Er for guix-patches@gnu.org; Sun, 14 Jun 2020 01:34:28 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:38214) by eggs.gnu.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jkLHm-0005bH-IC; Sun, 14 Jun 2020 01:34:28 -0400 Received: by mail-pj1-x1033.google.com with SMTP id d6so5647495pjs.3; Sat, 13 Jun 2020 22:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:mime-version; bh=G0M33l79kgNdCuPJ9AVQ1voF82isNnM2YRRyIVp/bQM=; b=WrGtLjDUM9kfhUUEm2oYXLvJj2WFKNdhoBU1XmvscUq+yH0MVOEHV3fGBDGiZv9Eag T4S4faWL8nnTuljX6XyI0uRrxYScqR/pW40B2OOFLqrgQQvExxoxyUIF8qZvi857Y57d NchhY2lF0zuF7BDZCyNthsBfZD082Ipds/oTkTTCHfrj4KHEfRfW87t0ob6mX5S8ODmT g2yZO+Q+90YP1GXrRohX59h7A2zjWPm4phMIrFebChlYztooGv9R+CnriwCdBo5H61jn H3YV36J49uSk7A7q1iXZel5raSOa3XPncR0+IdfxxO/+HxJ05JFFdhgr8KSOuL/0mPPP TE9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version; bh=G0M33l79kgNdCuPJ9AVQ1voF82isNnM2YRRyIVp/bQM=; b=B2Zn739K7xAMmrcXvxXg4iFpj/xCQTxtnkChU0YC+ZEaOIVqcBpJDjxvRaLvNtdTkt pfS4XPmTqlH5tIYPEMN7FkNyqAxM9rGCEwJu3rKY5o3nm6HzijNQ7RcHi1exw/ZxBnfV hvehSn5pF7zCfQwS4zAenRqoEqUNP/Qf/qvBK7uHcytW7ohEVCJpxKuUCkLlHVrgxILC bQ2ckFJCAk+Y6unQgFz84vc5zGD1ulV/Q90teyQwHbQmiTHXZBdyNOxoSiXK601l6cxS GEtcSgzHwHQI+JszqEvZnko+xAGEXiRq/MBmsXpwgoHvrLrCyvMR+jlL/p2XzP3iY72W fEUw== X-Gm-Message-State: AOAM532sIIvJzVcBC8PLFP0XSzApWUqb1Srpeyv0VQCjfgHur6f0me4x hEC5ERuWGJ09Clrbm7KJBFU07hidgd8= X-Google-Smtp-Source: ABdhPJx0X7Qbby+enI9/XPl28C3L/W8bjxpzXLcf+WisQlz/DmtmbN9yRKdbdN35eO24cWf17NLhLA== X-Received: by 2002:a17:90b:252:: with SMTP id fz18mr5730043pjb.96.1592112854182; Sat, 13 Jun 2020 22:34:14 -0700 (PDT) Received: from garuda-lan (c-73-97-103-127.hsd1.wa.comcast.net. [73.97.103.127]) by smtp.gmail.com with ESMTPSA id d5sm10600435pfd.124.2020.06.13.22.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jun 2020 22:34:13 -0700 (PDT) From: Chris Marusich Date: Sat, 13 Jun 2020 22:34:11 -0700 Message-ID: <878sgqi52k.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=cmmarusich@gmail.com; helo=mail-pj1-x1033.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=WrGtLjDU; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 0.49 X-TUID: PJw9dO0iwD1W --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Ludo and others, Here's a patch to add some missing lint test cases. I confirmed that all the lint tests pass. I also confirmed that the new " patches: same file name -> no warnings" test case fails (as expected) when commit 21887021b9acf60157b1b0a39c16f2ec6498021b is reverted, so the new tests do seem to be working as intended. Thank you for encouraging me to add these test cases, Ludo! =2D-=20 Chris --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-tests-lint-Add-origin-patch-file-name-test-cases.patch Content-Transfer-Encoding: quoted-printable From=205fa2156f8561afb87d7f9a63de0243334e9da53b Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sat, 13 Jun 2020 22:09:46 -0700 Subject: [PATCH] tests: lint: Add origin patch file name test cases. In particular, " patches: same file name -> no warnings" would have caught the issue which was fixed in commit 21887021b9acf60157b1b0a39c16f2ec6498021b. * tests/lint.scm (patches: file names): Rename this test case... ("file patches: different file name -> warning"): ... to this. ("file patches: same file name -> no warnings") (" patches: different file name -> warning") (" patches: same file name -> no warnings"): New test cases. =2D-- tests/lint.scm | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/tests/lint.scm b/tests/lint.scm index 4ce45b4a70..53647373e4 100644 =2D-- a/tests/lint.scm +++ b/tests/lint.scm @@ -310,7 +310,7 @@ `(("python-setuptools" ,python-setuptools)))= ))) (check-inputs-should-not-be-an-input-at-all pkg)))) =20 =2D(test-equal "patches: file names" +(test-equal "file patches: different file name -> warning" "file names of patches should start with the package name" (single-lint-warning-message (let ((pkg (dummy-package "x" @@ -319,6 +319,37 @@ (patches (list "/path/to/y.patch"))))))) (check-patch-file-names pkg)))) =20 +(test-equal "file patches: same file name -> no warnings" + '() + (let ((pkg (dummy-package "x" + (source + (dummy-origin + (patches (list "/path/to/x.patch"))))))) + (check-patch-file-names pkg))) + +(test-equal " patches: different file name -> warning" + "file names of patches should start with the package name" + (single-lint-warning-message + (let ((pkg (dummy-package "x" + (source + (dummy-origin + (patches + (list + (dummy-origin + (file-name "y.patch"))))))))) + (check-patch-file-names pkg)))) + +(test-equal " patches: same file name -> no warnings" + '() + (let ((pkg (dummy-package "x" + (source + (dummy-origin + (patches + (list + (dummy-origin + (file-name "x.patch"))))))))) + (check-patch-file-names pkg))) + (test-equal "patches: file name too long" (string-append "x-" (make-string 100 #\a) =2D-=20 2.26.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAl7lttMACgkQ3UCaFdgi Rp3DHxAAwSArK23xbQ9rwYPw0ZHbVksMPBjj/34+VTqFR3bd0h5OzgZqFh8LpX53 pfN+uHMcD8S7E4cM89YixMWHtDjp1B1LHuLadesAWCP/KJGRwxTYVxqedOT8J/qB mb6A+/sIzcc2s1s7k2GJcn4ryYkGaLllsZAVuc2MqaMikcBBs22KWolXLqCX3QzT 13NpJgnYnsJJKpJ1G06hjVUPr3rtOGHysTBuCKKD/ePhEqXR1zT+Uliaelg+tqIk XP+Yy3uU0IcW+Mqp+U89qJa0jwhPeaOMyOzLsBa80USPJJV6vsmMv2ium46b87YF fYxIqwEyidngz7ulbmdQHx6qtERxckCTEs+qEqzYu0nshlaT5x4L6bK7oenvuxc5 yMF+zwFqNVh9r2bYtjOoTLd5FmjuorGDIy4V2f5h2Os4J18MCMzw2NBWB2DXTLZ0 L8iYArA2WQHLDFDli7qUx8abp88PDBGyzpokvFoq7EdjsgyxofUtMDie6M2cBeCn mNvIl1QxT8moIdqcCIXD/AAQQ94yCgPLeOpQBcIvlTbgYXRkOc9rAF9jN9GSipjx Jyr6bXARkX4M87VbkkvEY/Ee3jkgJcObtZG4aSCxKVUvSu6Px3Y+PKIZzvgtqHNz NuoMYJkvZkn/uK8OJyVj5+QWFZEQM6ZAN/iTIlHlIDiZ2mmTxyU= =0RPr -----END PGP SIGNATURE----- --==-=-=--