@@ -2,7 +2,6 @@ package bench
22
33import (
44 "bytes"
5- "context"
65 "errors"
76 "fmt"
87 "go/build"
@@ -55,8 +54,7 @@ func Benchmark_linters(b *testing.B) {
5554
5655 for _ , repo := range repos {
5756 b .Run (repo .name , func (b * testing.B ) {
58- // TODO(ldez): clean inside go1.25 PR
59- _ = exec .CommandContext (context .Background (), binName , "cache" , "clean" ).Run ()
57+ _ = exec .CommandContext (b .Context (), binName , "cache" , "clean" ).Run ()
6058
6159 b .Chdir (repo .dir )
6260
@@ -77,8 +75,7 @@ func Benchmark_linters(b *testing.B) {
7775func Benchmark_golangciLint (b * testing.B ) {
7876 installGolangCILint (b )
7977
80- // TODO(ldez): clean inside go1.25 PR
81- _ = exec .CommandContext (context .Background (), binName , "cache" , "clean" ).Run ()
78+ _ = exec .CommandContext (b .Context (), binName , "cache" , "clean" ).Run ()
8279
8380 cases := getAllRepositories (b )
8481
@@ -160,8 +157,7 @@ func cloneGithubProject(tb testing.TB, benchRoot, owner, name string) string {
160157 if _ , err := os .Stat (dir ); os .IsNotExist (err ) {
161158 repo := fmt .Sprintf ("https://github.com/%s/%s.git" , owner , name )
162159
163- // TODO(ldez): clean inside go1.25 PR
164- err = exec .CommandContext (context .Background (), "git" , "clone" , "--depth" , "1" , "--single-branch" , repo , dir ).Run ()
160+ err = exec .CommandContext (tb .Context (), "git" , "clone" , "--depth" , "1" , "--single-branch" , repo , dir ).Run ()
165161 if err != nil {
166162 tb .Fatalf ("can't git clone %s/%s: %s" , owner , name , err )
167163 }
@@ -194,8 +190,7 @@ func launch(tb testing.TB, run func(testing.TB, string, []string), args []string
194190func run (tb testing.TB , name string , args []string ) {
195191 tb .Helper ()
196192
197- // TODO(ldez): clean inside go1.25 PR
198- cmd := exec .CommandContext (context .Background (), name , args ... )
193+ cmd := exec .CommandContext (tb .Context (), name , args ... )
199194 if os .Getenv ("PRINT_CMD" ) == "1" {
200195 log .Print (strings .Join (cmd .Args , " " ))
201196 }
@@ -213,8 +208,7 @@ func run(tb testing.TB, name string, args []string) {
213208func countGoLines (tb testing.TB ) int {
214209 tb .Helper ()
215210
216- // TODO(ldez): clean inside go1.25 PR
217- cmd := exec .CommandContext (context .Background (), "bash" , "-c" , `find . -type f -name "*.go" | grep -F -v vendor | xargs wc -l | tail -1` )
211+ cmd := exec .CommandContext (tb .Context (), "bash" , "-c" , `find . -type f -name "*.go" | grep -F -v vendor | xargs wc -l | tail -1` )
218212
219213 out , err := cmd .CombinedOutput ()
220214 if err != nil {
@@ -327,8 +321,7 @@ func installGolangCILint(tb testing.TB) {
327321
328322 parentPath := findMakefile (tb )
329323
330- // TODO(ldez): clean inside go1.25 PR
331- cmd := exec .CommandContext (context .Background (), "make" , "-C" , parentPath , "build" )
324+ cmd := exec .CommandContext (tb .Context (), "make" , "-C" , parentPath , "build" )
332325
333326 output , err := cmd .CombinedOutput ()
334327 if err != nil {
0 commit comments