Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cmd/gno): allow testing packages which contain test files with `p…
…ackage x_test` (#1330) Reproduce error from #638 package ./. already exists in cache EDIT: And fixed it 🎉 ``` $ go run ./gnovm/cmd/gno test --verbose ./examples/gno.land/p/demo/lol panic: package gno.land/p/demo/lol already exists in cache goroutine 1 [running]: github.com/gnolang/gno/gnovm/pkg/gnolang.(*defaultStore).SetCachePackage(0x1400020a240, 0x14005f23e00) /Users/albttx/go/src/github.com/gnolang/gno/gnovm/pkg/gnolang/store.go:207 +0x10c github.com/gnolang/gno/gnovm/pkg/gnolang.(*Machine).RunMemPackage(0x14006aba6c0, 0x1400038ff80, 0x1) /Users/albttx/go/src/github.com/gnolang/gno/gnovm/pkg/gnolang/machine.go:225 +0x190 main.gnoTestPkg({0x16fa42ab0, 0x1e}, {0x1400025f4a0?, 0x1, 0x100a8567c?}, {0x0, 0x0, 0x101374df8?}, 0x1400038e640, 0x14000306820) /Users/albttx/go/src/github.com/gnolang/gno/gnovm/cmd/gno/test.go:354 +0x3f8 main.execTest(0x1400038e640, {0x1400025f3b0, 0x1, 0x1}, 0x0?) /Users/albttx/go/src/github.com/gnolang/gno/gnovm/cmd/gno/test.go:255 +0x804 main.newTestCmd.func1({0x0?, 0x0?}, {0x1400025f3b0?, 0x14000696e58?, 0x0?}) /Users/albttx/go/src/github.com/gnolang/gno/gnovm/cmd/gno/test.go:97 +0x38 github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x0?, {0x100e55608?, 0x14000190010?}) /Users/albttx/go/src/github.com/gnolang/gno/tm2/pkg/commands/command.go:233 +0x17c github.com/gnolang/gno/tm2/pkg/commands.(*Command).Run(0x14000696b00?, {0x100e55608?, 0x14000190010?}) /Users/albttx/go/src/github.com/gnolang/gno/tm2/pkg/commands/command.go:237 +0x12c github.com/gnolang/gno/tm2/pkg/commands.(*Command).ParseAndRun(0x14000180000?, {0x100e55608, 0x14000190010}, {0x140001a6050?, 0x60?, 0x0?}) /Users/albttx/go/src/github.com/gnolang/gno/tm2/pkg/commands/command.go:118 +0x4c main.main() /Users/albttx/go/src/github.com/gnolang/gno/gnovm/cmd/gno/main.go:14 +0x74 exit status 2 ``` <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests - [ ] Added new benchmarks to [generated graphs](https://gnoland.github.io/benchmarks), if any. More info [here](https://github.com/gnolang/gno/blob/master/.benchmarks/README.md). </details> --------- Co-authored-by: Manfred Touron <[email protected]> Co-authored-by: Morgan Bazalgette <[email protected]>
- Loading branch information