File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,15 @@ package main
22
33import (
44 "fmt"
5+ "runtime"
56
67 _ "github.com/lib/pq"
78 do "gopkg.in/godo.v2"
89)
910
1011func tasks (p * do.Project ) {
12+ numCPU := runtime .NumCPU ()
13+
1114 do .Env = `
1215 DAT_DRIVER=postgres
1316 DAT_DSN="dbname=dbr_test user=dbr password=!test host=localhost sslmode=disable"
@@ -18,8 +21,8 @@ func tasks(p *do.Project) {
1821 p .Task ("createdb" , nil , createdb ).Description ("Creates test database" )
1922
2023 p .Task ("test" , nil , func (c * do.Context ) {
21- c .Run (`go test -race` )
22- c .Run (`go test -race` , do.M {"$in" : "sqlx-runner" })
24+ c .Run (`GOMAXPROCS={{.numCPU}} go test -race` , do. M { "numCPU" : numCPU } )
25+ c .Run (`GOMAXPROCS={{.numCPU}} go test -race` , do.M {"$in" : "sqlx-runner" , "numCPU" : numCPU })
2326 }).Src ("**/*.go" ).
2427 Desc ("test with -race flag" )
2528
You can’t perform that action at this time.
0 commit comments