On 5/1/24 02:43, Edd Barrett wrote:
On Wed, May 01, 2024 at 01:07:07AM -0400, Russ Sharek wrote:
Here's a diff that adds both the NO_TEST and README.md to the port.
I know nothing about go, but I had a quick look into getting the tests working.

According to the interwebs, adding a do-test target this should run all tests
in the source dir:

```
do-test:
        cd ${WRKSRC} && ${MODGO_CMD} test ./...
```

But if you run `go test cmd` much more tests are run, which leads me to believe
that the above isn't running all of the tests as advertised.

I'm not really sure why the default `do-test` isn't sufficient either.

Right, that's it. I'm invoking abieber@ :)

Any ideas abieber@?


So `cmd/...` will match anything in GOPATH which in our env includes `/usr/local/go-pkg` (which has its own "cmd" tests).

From `go help packages`:

  An import path is a pattern if it includes one or more "..." wildcards,
each of which can match any string, including the empty string and
strings containing slashes. Such a pattern expands to all package
directories found in the GOPATH trees with names matching the
patterns.

Looks like all of their tests are in "internal", you can do `go test internal/...`.  This seems to make
tests work for me.

I think the default case for `MODGO_TEST_TARGET` (which is basically "go test github.com/s0rg/crawley" fails because `_MODGO_SETUP` is missing the .zip and .mod files for that package itself.

Reply via email to