cmd/bench: run benchmark tests from gopls module
CL 453502 runs benchmark tests from tools module with gopls in test dir. Change to run benchmark tests within gopls module instead.
Change-Id: I1c8b2cdac29dcb414f5c3fe9435e320521e02388
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/457415
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Dylan Le <dungtuanle@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/cmd/bench/gotest.go b/cmd/bench/gotest.go
index 25cfe65..caa8c88 100644
--- a/cmd/bench/gotest.go
+++ b/cmd/bench/gotest.go
@@ -7,6 +7,7 @@
import (
"fmt"
"log"
+ "path/filepath"
)
func goTest(tcs []*toolchain) error {
@@ -28,7 +29,7 @@
fmt.Printf("toolchain: %s\n", tc.Name)
for _, dir := range dirs {
- err := tc.Do(dir, "test", "-v", "-bench=.", "./gopls/internal/regtest/bench/", "-count=5")
+ err := tc.Do(filepath.Join(dir, "gopls"), "test", "-v", "-bench=.", "./internal/regtest/bench/", "-count=5")
if err != nil {
log.Printf("Error: %v", err)
return fmt.Errorf("error running sub-repo %s benchmark with toolchain %s in dir %s: %w", subRepo, tc.Name, dir, err)