GNU bug report logs - #74786
[PATCH] Add custom args to test compile step

Previous Next

Package: emacs;

Reported by: "O'Brien, Will" <will.08rien <at> gmail.com>

Date: Wed, 11 Dec 2024 11:29:02 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #41 received at 74786 <at> debbugs.gnu.org (full text, mbox):

From: Randy Taylor <dev <at> rjt.dev>
To: "O'Brien, Will" <will.08rien <at> gmail.com>
Cc: Robert Pluim <rpluim <at> gmail.com>, 74786 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz <at> gnu.org>, "J.P." <jp <at> neverwas.me>
Subject: Re: bug#74786: [PATCH] Add custom args to test compile step
Date: Wed, 01 Jan 2025 23:50:32 +0000
On Friday, December 20th, 2024 at 11:14, O'Brien, Will <will.08rien <at> gmail.com> wrote:
> 
> 
> Hi,
> 
> On Thu, Dec 19 2024 at 16:20, "O'Brien, Will" will.08rien <at> gmail.com wrote:
> 
> > I believe the attached patch should cover your suggestion, Randy,
> > as well as incorporating Robert's and J.P.'s suggestions.

Thanks, the patch looks good to me.
There is a typo:
+  "Return the flags for test invoation."
                              ^invocation

> 
> 
> I think there's a further issue which I believe was pre-existing.
> 
> The package test function looks like this:
> 
> --8<---------------cut here---------------start------------->8---
> 
> (defun go-ts-mode-test-this-package ()
> "Run all the unit tests under the current package."
> (interactive)
> (compile (format "go test -v %s -run %s"
> (go-ts-mode--get-build-tags-flag)
> default-directory)))
> --8<---------------cut here---------------end--------------->8---
> 
> 
> The issue that the argument to the `-run` flag is a regex that
> should match any tests that will be execute. Passing a directory
> has slightly unexpected consequences, and although it seems to
> work, for me typically results tests not running.
> 
> I think that we can remove the `-run` flag from this function.
> What do others think? Also, should this be a separate bug/patch
> (if indeed it is a bug) or I can incorporate this change into the
> current change set.
> 
> best
> --
> will

I believe you are correct, we can get rid of the -run flag.
Please incorporate these changes as part of this patch.

(Side note, maybe we should actually pass the package to
go test instead of relying on default directory but
don't worry about that for this patch).




This bug report was last modified 136 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.