unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: emacs-devel@gnu.org
Subject: Re: master updated (5af5ed6c62 -> f07505d1ec)
Date: Tue, 6 Sep 2022 11:41:56 -0700	[thread overview]
Message-ID: <eb82481f-c8cd-5609-3c43-4dbbb4e5ad63@gmail.com> (raw)
In-Reply-To: <87r10ox2xl.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 925 bytes --]

On 9/6/2022 2:33 AM, Lars Ingebrigtsen wrote:
> Speaking of eshell tests -- this one seems to be failing on EMBA in
> nativecomp:
> 
> https://emba.gnu.org/emacs/emacs/-/jobs/53337
> 
> 1 unexpected results:
>     FAILED  eshell-test/subcommand-reset-in-pipeline  ((should (eshell-command-result--equal command (eshell-test-command-result command) result)) :form (eshell-command-result--equal "*cat $<echo $eshell-in-pipeline-p | echo> | *cat" "first\n" "first") :value nil :explanation (nonequal-result (command "*cat $<echo $eshell-in-pipeline-p | echo> | *cat") (result "first\n") (expected "first")))
> 
> I'm unable to reproduce the failure myself.

Interesting; the test is outputting "first\n", but we don't expect the 
newline. Maybe this is because EMBA uses a different version of "cat"?

I think something like the attached patch would fix things. Then the 
test won't care about whether there's a newline or not.

[-- Attachment #2: 0001-Improve-robustness-of-an-Eshell-regression-test.patch --]
[-- Type: text/plain, Size: 1971 bytes --]

From b23948f4645fa3db3d309e2f1197ff389264b97c Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Tue, 6 Sep 2022 11:36:58 -0700
Subject: [PATCH] Improve robustness of an Eshell regression test

* test/lisp/eshell/eshell-tests.el
(eshell-test/subcommand-reset-in-pipeline): Use
'eshell-match-command-output' to check result.

Ref: https://lists.gnu.org/archive/html/emacs-devel/2022-09/msg00314.html
---
 test/lisp/eshell/eshell-tests.el | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/test/lisp/eshell/eshell-tests.el b/test/lisp/eshell/eshell-tests.el
index d5112146c2..2dc996e923 100644
--- a/test/lisp/eshell/eshell-tests.el
+++ b/test/lisp/eshell/eshell-tests.el
@@ -83,18 +83,19 @@ eshell-test/subcommand-reset-in-pipeline
   (dolist (template '("echo {%s} | *cat"
                       "echo ${%s} | *cat"
                       "*cat $<%s> | *cat"))
-    (eshell-command-result-equal
-     (format template "echo $eshell-in-pipeline-p")
-     nil)
-    (eshell-command-result-equal
-     (format template "echo | echo $eshell-in-pipeline-p")
-     "last")
-    (eshell-command-result-equal
-     (format template "echo $eshell-in-pipeline-p | echo")
-     "first")
-    (eshell-command-result-equal
-     (format template "echo | echo $eshell-in-pipeline-p | echo")
-     "t")))
+    (with-temp-eshell
+     (eshell-match-command-output
+      (format template "echo $eshell-in-pipeline-p")
+      "\\`\\'")
+     (eshell-match-command-output
+      (format template "echo | echo $eshell-in-pipeline-p")
+      "\\`last")
+     (eshell-match-command-output
+      (format template "echo $eshell-in-pipeline-p | echo")
+      "\\`first")
+     (eshell-match-command-output
+      (format template "echo | echo $eshell-in-pipeline-p | echo")
+      "\\`t"))))
 
 (ert-deftest eshell-test/lisp-reset-in-pipeline ()
   "Check that interpolated Lisp forms reset `eshell-in-pipeline-p'."
-- 
2.25.1


  reply	other threads:[~2022-09-06 18:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <166233264971.21612.17042094685015365861@vcs2.savannah.gnu.org>
2022-09-05  0:17 ` master updated (5af5ed6c62 -> f07505d1ec) Lars Ingebrigtsen
2022-09-05  0:18   ` Lars Ingebrigtsen
2022-09-05  0:22   ` Lars Ingebrigtsen
2022-09-05  0:25   ` Jim Porter
2022-09-06  9:33     ` Lars Ingebrigtsen
2022-09-06 18:41       ` Jim Porter [this message]
2022-09-06 20:13         ` Lars Ingebrigtsen
2022-09-06 22:46           ` Jim Porter
2022-09-07 11:46             ` Lars Ingebrigtsen
2022-09-07 21:03               ` Jim Porter
2022-09-08 12:02                 ` Lars Ingebrigtsen
2022-09-08 22:16                   ` Jim Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb82481f-c8cd-5609-3c43-4dbbb4e5ad63@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).