Skip to content

Commit

Permalink
Fixes race condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasd committed Mar 23, 2018
1 parent bae2f3e commit 8e1db69
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testrunner.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,13 @@ func worker(path, output chan string, wg *sync.WaitGroup) {
func run(path string, wg *sync.WaitGroup) string {
defer wg.Done()

localParts := make([]string, len(parts))
for i, part := range parts {
localParts[i] = part
}

start := time.Now()
cmdparts := append(parts[:], path)
cmdparts := append(localParts, path)

cmd := exec.Cmd{
Path: parts[0],
Expand Down

0 comments on commit 8e1db69

Please sign in to comment.