Subject: bug#74786: [PATCH] Add custom args to test compile step

From: "O'Brien, Will" <[email-masked]>
Date: Fri, 20 Dec 2024 16:14:54 +0000

Hi,

On Thu, Dec 19 2024 at 16:20, "O'Brien, Will" <[email-masked]> wrote:

> I believe the attached patch should cover your suggestion, Randy,
> as well as incorporating Robert's and J.P.'s suggestions.

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