Просмотр исходного кода

runner: Take the number of workers as a flag.

Default to the number of CPUs. Avoids the tests launching 64 valgrinds in
parallel on machines without gobs of memory.

Change-Id: I9eeb365b48aa7407e303d161f90ce69a591a884c
Reviewed-on: https://boringssl-review.googlesource.com/1375
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin 10 лет назад
committed by Adam Langley
Родитель
Сommit
2bc8e6fc9a
1 измененных файлов: 3 добавлений и 1 удалений
  1. +3
    -1
      ssl/test/runner/runner.go

+ 3
- 1
ssl/test/runner/runner.go Просмотреть файл

@@ -9,6 +9,7 @@ import (
"net"
"os"
"os/exec"
"runtime"
"strings"
"sync"
"syscall"
@@ -856,6 +857,7 @@ func statusPrinter(doneChan chan struct{}, statusChan chan statusMsg, total int)

func main() {
var flagTest *string = flag.String("test", "", "The name of a test to run, or empty to run all tests")
var flagNumWorkers *int = flag.Int("num-workers", runtime.NumCPU(), "The number of workers to run in parallel.")

flag.Parse()

@@ -866,7 +868,7 @@ func main() {

var wg sync.WaitGroup

const numWorkers = 64
numWorkers := *flagNumWorkers

statusChan := make(chan statusMsg, numWorkers)
testChan := make(chan *testCase, numWorkers)


Загрузка…
Отмена
Сохранить