From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#37476: [PATCH] Document ert test selectors in batch mode Date: Sun, 22 Sep 2019 15:38:54 +0200 Message-ID: References: <871rw8wkez.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="105223"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 37476@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 22 15:40:23 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iC269-000RBf-NH for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Sep 2019 15:40:21 +0200 Original-Received: from localhost ([::1]:46844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC267-0004de-UZ for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Sep 2019 09:40:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36685) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iC25t-0004dP-31 for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 09:40:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iC25s-0006Mc-2N for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 09:40:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iC25r-0006MJ-V7 for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 09:40:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iC25r-0000Ip-Ec for bug-gnu-emacs@gnu.org; Sun, 22 Sep 2019 09:40:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Sep 2019 13:40:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37476 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 37476-submit@debbugs.gnu.org id=B37476.15691595531085 (code B ref 37476); Sun, 22 Sep 2019 13:40:03 +0000 Original-Received: (at 37476) by debbugs.gnu.org; 22 Sep 2019 13:39:13 +0000 Original-Received: from localhost ([127.0.0.1]:33516 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC253-0000HR-Ij for submit@debbugs.gnu.org; Sun, 22 Sep 2019 09:39:13 -0400 Original-Received: from mail-pg1-f169.google.com ([209.85.215.169]:38103) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iC252-0000HC-1O for 37476@debbugs.gnu.org; Sun, 22 Sep 2019 09:39:12 -0400 Original-Received: by mail-pg1-f169.google.com with SMTP id x10so6346080pgi.5 for <37476@debbugs.gnu.org>; Sun, 22 Sep 2019 06:39:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Ju5IMcyeg8ElKKXCs2Jzc3uH6ekLOGTHY4N9Y6OKmEM=; b=qexnTcSPfcMXXi21mOzPopNS326aZgtlf+7H6rZFP7W2YIPMPubyeeeANmIUADQioU kKqbxBr4LEb+pwWT33VYBhJn4xfqY/rQZ8dTHAFeiA7eDNnYOXjCgR+Y5XVrVsc13W6J hDLK/VnunekU8OJTtWT8UX85hOXh22/DwOb1PimkF4TRa4n+cbl+6nYtQmX9cVY96i3C 1JLcIV4poYaNpFmO8Jmh+/SrnlasMKOcNiB0j7/ic/jc/cDus1NZXAMgpNEjWUNPGymn SSidqAlOjfgrdF1MKm8qTk6RB7YbXcZW8CguUtX4pp1GboPjrv62UUim7kRK2BP+Jopl ws4A== X-Gm-Message-State: APjAAAX0N62Reb+cEc3VOTGX97sueRqo9NfMt2r4lsf56cCYvmIuzYff eDDlNcagloQxDECHvKMpvfrGDyRGbzSjHC0mcz8= X-Google-Smtp-Source: APXvYqyDihlHk4Xsg1/OEDafDcZpjvyBnQOvoO1h+seIh6UxCC6z224WxsLurBTfDaDrlItZx7OyWp06nMRQX8hSX9A= X-Received: by 2002:a62:e917:: with SMTP id j23mr13517005pfh.50.1569159546080; Sun, 22 Sep 2019 06:39:06 -0700 (PDT) In-Reply-To: <871rw8wkez.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166906 Archived-At: Lars Ingebrigtsen writes: > > -If ERT is not part of your Emacs distribution, you may need to use > > +You can specify selectors to only run a subset of your tests > > +(@pxref{Test Selectors}). For example, the following would run all > > +tests where the name of the test matches the string ``to-match''. > > + > > +@example > > +emacs -batch -l ert -l my-tests.el \ > > + -eval '(ert-run-tests-batch-and-exit "to-match")' > > +@end example > > I guess that would be nice to have documented, but it's not a use case > I've ever had. Tests are usually grouped in separate files, so you'd > usually have (as in Emacs) "make foo-tests" or whatever in your > Makefiles. I find that it's sometimes easier to run just one unit test from a file, since there is less output and therefore less scrolling. I've had to search the web to find out how to do this before. I'm not sure I understand the second sentence. Package developers might have a Makefile similar to the one Emacs core has, which allows you to easily specify test selectors, but they might also be missing one. > > +If you are using a version of Emacs older than 24.1, ERT is not part > > +of your Emacs distribution. In this case, you may need to use > > The Emacs manuals usually document what's currently in Emacs, so it's a > bit odd to be talking about Emacs 24.1 here, isn't it? So perhaps that > paragraph should just be removed? I completely agree, and was simply trying to be conservative. If that's what we want, I'll be happy to remove it. Thanks for reviewing the patch. Best regards, Stefan Kangas